Query Table

If you are the admin user, you can use the nzstats command to display the Query Table, which displays information about the queries currently 'running/executing'. Those queries which have completed execution and whose results sets are being returned to a client user are not listed in this table. You can use the system view _v_qrystat to view the status of queries that are running. For more information, see Table 1.

This query table uses the _v_qrystat view for compatibility with an earlier release and will be deprecated in a future release. For more information, see Collecting data history.

The Query Table has the following columns:
Table 1. Query Table
Column Description
Query Id The ID of the query.
Session Id The ID of the session that initiated this query.
Plan Id The internal ID of the plan that is associated with this query.
Client Id The internal client ID associated with the query's session.
Client IP Addr The client's IP address.
SQL Statement The SQL statement. You can see the entire string by increasing the width of the column.
State The state of the query in integer form.
State Text The state of the query in text form. Possible states are pending, queued, running.
Submit Date The date and time that the query was submitted.
Start Date The date and time that the query started running.
Elapsed Time The estimated elapsed time, as determined by the optimizer.
Priority The priority number.
Priority Text The priority text string.
Estimated Cost The estimated seconds, as determined by the optimizer.
Estimated Disk The estimated disk usage, as determined by the optimizer.
Estimated Memory The estimated memory usage, as determined by the optimizer.
Snippets The number of snippets (steps) in the plan for this query.
Snippets Done The number of snippets that have finished.
Snippets Done Pct The percentage of snippets that have finished.
Result Rows The number of rows in the result.
Result Bytes The number of bytes in the result.