1 grid.result.getStatistics

Release 2017.3

Tag available since version 2017.3.

Returns a result set with statistics about the execution showing for each database rows obtained, elapsed time to execute the query, defined timeout and the exception if occurs.

<grid.result.getStatistics>
    <resultSet /> !
</grid.result.getStatistics>
Example
Copy
<xsql-script>
    <body>
        <connection name='sysmaster1'>
            <set name='rs'>
                <!-- Run a multi database query, returning a memory result set. -->
                <!-- Each db has it's pool configuration timeout but can be owerride via timeout !=0 -->

                <select.grid name='grid_demo' timeout='30'>
                    <columns>tabname, nrows, npused</columns>
                    <from table='systables' />
                    <where>tabname LIKE 'capuntes%'</where>
                </select.grid>
            </set>
        </connection>

        <println>
            <rs/>
        </println>

        <println>... Statistics: <grid.result.getStatistics><rs /></grid.result.getStatistics></println>

    </body>
</xsql-script>
+--------+-----------+----------+--------------+----------+
|tabname |nrows      |npused    |grid_node     |grid_error|
|varchar |float      |float     |char          |char      |
|visible |visible    |visible   |visible       |visible   |
+--------+-----------+----------+--------------+----------+
|capuntes|   7887,000|  1604,000|demo_sports   |          |
|capuntes| 442028,000| 89265,000|demo_industria|          |
|capuntes|4557441,000|955229,000|demo_cons     |          |
+--------+-----------+----------+--------------+----------+

... Statistics: 
+--------------+-------+-------+-------+---------+
|node          |rows   |time   |timeout|exception|
|char          |integer|long   |integer|object   |
|visible       |visible|visible|visible|visible  |
+--------------+-------+-------+-------+---------+
|demo_sports   |      1|      6|     30|         |
|demo_industria|      1|      6|     30|         |
|demo_cons     |      1|      5|     30|         |
+--------------+-------+-------+-------+---------+