Skip to content

sys.query_analyze

This view records runtime statistics for each execution step (or node) in the query plan. A unique row in this table is identified by a combination of the query ID, worker ID, and node ID. All of the reported statistics are per plan node per worker.

Column NameData TypeDescription
query_idbigintQuery execution ID
worker_idtextWorker ID
node_idintegerNode ID within the query plan
rows_plannedbigintEstimated number of rows that will be output by this query node
rows_actualbigintActual number of rows output from this query node
memory_planned_bytesbigintEstimated amount of memory required for this query node
memory_actual_bytesbigintAmount of memory consumed by this query node
io_read_bytesbigintNumber of bytes read
io_write_bytesbigintNumber of bytes written
io_network_bytesbigintNumber of bytes sent over the network
io_network_countbigintNumber of network calls made
runtime_msdecimal(18,3)Wall clock time in milliseconds: how long the plan node was running on the worker nodes
skewdouble precisionA value between 0 and 1 that indicates how evenly distributed the input is to the query node: 0 indicates perfect distribution and 1 indicates all data is on a single node.Important: Values above 0.3 should be investigated.

detailvarchar(1024)Textual data that describes additional statistics for this query node.

Examples

premdb=# select query_id, worker_id, node_id, memory_actual_bytes, io_read_bytes, io_write_bytes, io_network_bytes, io_network_count, runtime_ms, rows_actual as rows 
from sys.query_analyze order by worker_id, query_id, node_id;
 query_id |              worker_id               | node_id | memory_bytes | io_read_bytes | io_write_bytes | io_network_bytes | io_network_calls | runtime_ms |   rows    
----------+--------------------------------------+---------+--------------+---------------+----------------+------------------+------------------+------------+-----------
   25832 | 00000000-0000-0000-0000-000000000002 |       0 |      3145936 |             0 |              0 |       8091360528 |             9078 |          0 | 157391700
   25832 | 00000000-0000-0000-0000-000000000002 |       1 |     17301376 |             0 |              0 |                0 |                0 |          9 |      8606
   25832 | 00000000-0000-0000-0000-000000000002 |       2 |       262144 |             0 |              0 |                0 |                0 |       2973 |      8606
   25832 | 00000000-0000-0000-0000-000000000002 |       3 |       262144 |             0 |              0 |                0 |                0 |       3009 |      8606
   25832 | 00000000-0000-0000-0000-000000000002 |       4 |        61440 |        131072 |              0 |                0 |                0 |       3066 |      8606
   25832 | 00000000-0000-0000-0000-000000000002 |       5 |      1048576 |             0 |              0 |                0 |                0 |       2973 |      8606
   25832 | 00000000-0000-0000-0000-000000000002 |       7 |      1310864 |             0 |              0 |                0 |                1 |       3006 |         0
   25832 | 00000000-0000-0000-0000-000000000002 |       8 |      1310720 |             0 |              0 |                0 |                0 |       3006 |         0
   25832 | 00000000-0000-0000-0000-000000000002 |       9 |      2097152 |             0 |              0 |                0 |                0 |          3 | 157391700
   25832 | 00000000-0000-0000-0000-000000000002 |      10 |       524288 |             0 |              0 |                0 |                0 |          4 |    756196
   25832 | 00000000-0000-0000-0000-000000000002 |      11 |       262144 |             0 |              0 |                0 |                0 |          4 |    756196
   25832 | 00000000-0000-0000-0000-000000000002 |      12 |      1078272 |             0 |              0 |                0 |                0 |          5 |    763136
   25832 | 00000000-0000-0000-0000-000000000002 |      13 |      1048576 |             0 |              0 |                0 |                0 |          4 |    756196
   25832 | 00000000-0000-0000-0000-000000000002 |      15 |      1310828 |             0 |              0 |                0 |                1 |        375 |         0
   25832 | 00000000-0000-0000-0000-000000000002 |      16 |      1310720 |             0 |              0 |                0 |                0 |        375 |         0
...

Parent topic:System Views