|Built-in System Procedures / WAN, Statistics, and User Configuration Procedures|
Enables or disables query statistics collection in the SYS.QUERYSTATS system table.
SYS.SET_QUERYSTATS ( IN ENABLE BOOLEAN NOT NULL )
gfxd> call sys.set_querystats(1);
After running the queries you want to measure, query SYS.QUERYSTATS to determine the most time-consuming queries. For example, this query shows the top 10 longest-running queries across all GemFire XD members:
gfxd> select sum(totaltime)/avg(numinvocations) t, query from sys.querystats > where numinvocations > 0 group by query order by t desc fetch first 10 rows only;
gfxd> call sys.set_querystats(0);