ifx_gridquery_skipped_node_count() function
The ifx_gridquery_skipped_node_count() function returns the number of servers that were unavailable during a grid or shard query.
Syntax
Usage
If you set the GRID_NODE_SKIP option of the SET ENVIRONMENT statement to 'on'
,
any servers that are unavailable when a grid or shard query is run are skipped. Run the
ifx_gridquery_skipped_node_count() function to return the number of a skipped
servers.
Use the ifx_gridquery_skipped_node_count() function with the ifx_gridquery_skipped_nodes() function. Run the ifx_gridquery_skipped_node_count() function to determine how many servers were skipped, and then run the ifx_gridquery_skipped_nodes() function the same number of times as the number of skipped servers.
After a grid or shard query is run, the next SELECT statement that is run resets skipped node count, so ifx_gridquery_skipped_node_count() must be used in an EXECUTE FUNCTION statement.
Return value
An integer that indicates the number of skipped servers.
0 indicates that no grid or shard servers were skipped.
Example
The following statement returns the number of skipped nodes in the grid or shard query:
EXECUTE FUNCTION ifx_gridquery_skipped_node_count();
2