SHOW_NODE_INFO
SHOW_NODE_INFO
returns a snapshot of the current query plan, similarly to the EXPLAIN ANALYZE
function used in other databases.
The snapshot provides information about execution which can be used for monitoring and troubleshooting slow running statements by helping identify long-running execution nodes (components that process data), etc.
See also EXPLAIN, SHOW_SERVER_STATUS.
Permissions
The role must have the SUPERUSER
permissions.
Syntax
show_node_info_statement ::=
SELECT SHOW_NODE_INFO(stmt_id)
;
stmt_id ::= bigint
Parameters
Parameter |
Description |
---|---|
|
The statement ID to explore |
Returns
This utility returns details of the execution nodes, if the statement is still running.
If the statement has finished, or the statment ID does not exist, the utility returns an empty result set.
Column name |
Description |
---|---|
|
The ID for the statement |
|
This node’s ID in this execution plan |
|
The node type |
|
Total number of rows this node has processed |
|
Number of chunks this node has processed |
|
Average amount of rows that this node processes in each chunk ( |
|
Timestamp for this node’s creation |
|
The |
|
Total data read from disk |
|
Total data written to disk |
|
Additional information (e.g. table name for |
|
Total elapsed time for this execution node’s processing |
Node types
This is a full list of node types:
Column name |
Execution location |
Description |
---|---|---|
|
Used during insert operations |
|
|
Used during insert operations, with identity columns |
|
|
Used to calculate ranges for the chunk metadata system |
|
|
An operation to optimize |
|
|
CPU and GPU |
Compress data with both CPU and GPU schemes |
|
CPU |
Decompression operation, common for longer |
|
CPU |
A non-indexed nested loop join, performed on the CPU |
|
CPU |
A reduce process performed on the CPU, primarily with |
|
An operation that moves data to or from the GPU for processing |
|
|
CPU |
A transform operation performed on the CPU, usually a scalar function |
|
A join without a join condition |
|
|
CPU |
Merges the results of GPU operations with a result set [1] |
|
GPU |
Removes duplicate rows (usually as part of the |
|
CPU |
The merge operation of the |
|
GPU |
A filtering operation, such as a |
|
GPU |
Copies data between GPUs or within a single GPU |
|
GPU |
Decompression operation |
|
GPU |
An operation to optimize part of the merger phases in the GPU |
|
GPU |
A transformation operation such as a type cast or scalar function |
|
CPU |
Hashes the output result. Used internally. |
|
Used internally. |
|
|
CPU |
Creates a virtual relation (table), when VALUES is used |
|
CPU |
Validates external file paths for foreign data wrappers, expanding directories and GLOB patterns |
|
GPU |
A non-indexed nested loop join, performed on the GPU |
|
Used in outer joins, matches rows for larger join operations |
|
|
Replaces duplicate values with |
|
|
CPU |
Used internally |
|
CPU |
A CSV parser, used after |
|
CPU |
Fetches data from the network queue (e.g. when used with INSERT) |
|
CPU |
Sends result sets to a client connected over the network |
|
CPU |
Converts the catalog into a relation (table) |
|
CPU |
Reads external flat-files |
|
CPU |
Reads data from an ORC file |
|
CPU |
Reads data from a Parquet file |
|
CPU |
Reads data from a standard table stored on disk |
|
CPU |
Reads only table metadata as an optimization |
|
Reorganize multiple small chunks into a full chunk. Commonly found after joins and when HIGH_SELECTIVITY is used |
|
|
GPU |
A reduction operation, such as a |
|
GPU |
A merge operation of a reduction operation, helps operate on larger-than-RAM data |
|
Change the order of arguments in preparation for the next operation |
|
|
GPU |
Gathers additional columns for the result |
|
GPU |
Sort operation [2] |
|
CPU |
A merge operation of a sort operation, helps operate on larger-than-RAM data |
|
GPU |
A sort-merge join, performed on the GPU |
|
Take the first N rows from each chunk, to optimize |
|
|
Limits the input size, when used with |
|
|
CPU |
Executes a user defined function |
|
Combines two sources of data when |
|
|
Used internally |
|
|
Used intenrally |
|
|
GPU |
Executes a non-ranking window function |
|
GPU |
Executes a ranking window function |
|
CPU |
Writes the result set to a standard table stored on disk |
Footnotes
Statement statuses
Notes
This utility shows the execution information for active statements. Once a query has finished execution, the information is no longer available using this utility. See Logging for more information about extracting the information from the logs.
This utility is primarily intended for troubleshooting with SQream support.
Examples
Getting execution details for a statement
t=> SELECT SHOW_SERVER_STATUS();
service | instanceid | connection_id | serverip | serverport | database_name | user_name | clientip | statementid | statement | statementstarttime | statementstatus | statementstatusstart
--------+------------+---------------+--------------+------------+---------------+-----------+--------------+-------------+-----------------------------------------------------------------+---------------------+-----------------+---------------------
sqream | | 152 | 192.168.1.91 | 5000 | t | sqream | 192.168.1.91 | 176 | SELECT "Name" FROM nba WHERE REGEXP_COUNT("Name", '( )+', 8)>1; | 2019-12-25 23:53:13 | Executing | 2019-12-25 23:53:13
sqream | | 151 | 192.168.1.91 | 5000 | t | sqream | 192.168.0.1 | 177 | SELECT show_server_status() | 2019-12-25 23:51:31 | Executing | 2019-12-25 23:53:13
The statement ID we want to reserach is 176
, running on worker 192.168.1.91
.
The query text is SELECT "Name" FROM nba WHERE REGEXP_COUNT("Name", '( )+', 8)>1;
t=> SELECT SHOW_NODE_INFO(176);
stmt_id | node_id | node_type | rows | chunks | avg_rows_in_chunk | time | parent_node_id | read | write | comment | timeSum
--------+---------+--------------------+------+--------+-------------------+---------------------+----------------+------+-------+------------+--------
176 | 1 | PushToNetworkQueue | 1 | 1 | 1 | 2019-12-25 23:53:13 | -1 | | | | 0.0025
176 | 2 | Rechunk | 1 | 1 | 1 | 2019-12-25 23:53:13 | 1 | | | | 0
176 | 3 | GpuToCpu | 1 | 1 | 1 | 2019-12-25 23:53:13 | 2 | | | | 0
176 | 4 | ReorderInput | 1 | 1 | 1 | 2019-12-25 23:53:13 | 3 | | | | 0
176 | 5 | Filter | 1 | 1 | 1 | 2019-12-25 23:53:13 | 4 | | | | 0.0002
176 | 6 | GpuTransform | 457 | 1 | 457 | 2019-12-25 23:53:13 | 5 | | | | 0.0002
176 | 7 | GpuDecompress | 457 | 1 | 457 | 2019-12-25 23:53:13 | 6 | | | | 0
176 | 8 | CpuToGpu | 457 | 1 | 457 | 2019-12-25 23:53:13 | 7 | | | | 0.0003
176 | 9 | Rechunk | 457 | 1 | 457 | 2019-12-25 23:53:13 | 8 | | | | 0
176 | 10 | CpuDecompress | 457 | 1 | 457 | 2019-12-25 23:53:13 | 9 | | | | 0
176 | 11 | ReadTable | 457 | 1 | 457 | 2019-12-25 23:53:13 | 10 | 4MB | | public.nba | 0.0004