1 grid.result.getAccuracy

Release 2017.3

Tag available since version 2017.3.

Returns the accuracy of the number of nodes where the query was executed. For example if the grid contains 4 nodes and one of them gets an exception the accuracy is 0.75.

<grid.result.getAccuracy>
    <resultSet /> !
</grid.result.getAccuracy>
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>
            ... The accuray of execution is: <grid.result.getAccuracy><rs /></grid.result.getAccuracy>
        </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     |          |
+--------+-----------+----------+--------------+----------+

... The accuray of execution is: 0.75