STL_DIST
Logs information about network activity during execution of query steps that distribute data. Network traffic is captured by numbers of rows, bytes, and packets that are sent over the network during a given step on a given slice. The duration of the step is the difference between the logged start and end times.
To identify distribution steps in a query, look for dist labels in the QUERY_SUMMARY view or run the EXPLAIN command and then look for step attributes that include dist.
STL_DIST is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see Visibility of data in system tables and views.
Note
STL_DIST only contains queries run on main provisioned clusters. It doesn't contain queries run on concurrency scaling clusters or on serverless namespaces. To access explain plans for queries run on both main clusters, concurrency scaling clusters, and serverless namespaces, we recommend that you use the SYS monitoring view SYS_QUERY_DETAIL . The data in the SYS monitoring view is formatted to be easier to use and understand.
Table columns
Column name | Data type | Description |
---|---|---|
userid | integer | ID of the user who generated the entry. |
query | integer | Query ID. The query column can be used to join other system tables and views. |
slice | integer | Number that identifies the slice where the query was running. |
segment | integer | Number that identifies the query segment. |
step | integer | Query step that ran. |
starttime | timestamp | Time in UTC that the query started. Total time includes queuing and execution. with 6 digits of precision for fractional seconds. For example: 2009-06-12 11:29:19.131358 . |
endtime | timestamp | Time in UTC that the query finished. Total time includes queuing and execution. with 6 digits of precision for fractional seconds. For example: 2009-06-12 11:29:19.131358 . |
tasknum | integer | Number of the query task process that was assigned to run the step. |
rows | bigint | Total number of rows that were processed. |
bytes | bigint | Size, in bytes, of all the output rows for the step. |
packets | integer | Total number of packets sent over the network. |
Sample queries
The following example returns distribution information for queries with one or more packets and duration greater than zero.
select query, slice, step, rows, bytes, packets, datediff(seconds, starttime, endtime) as duration from stl_dist where packets>0 and datediff(seconds, starttime, endtime)>0 order by query limit 10;
query | slice | step | rows | bytes | packets | duration --------+-------+------+--------+---------+---------+----------- 567 | 1 | 4 | 49990 | 6249564 | 707 | 1 630 | 0 | 5 | 8798 | 408404 | 46 | 2 645 | 1 | 4 | 8798 | 408404 | 46 | 1 651 | 1 | 5 | 192497 | 9226320 | 1039 | 6 669 | 1 | 4 | 192497 | 9226320 | 1039 | 4 675 | 1 | 5 | 3766 | 194656 | 22 | 1 696 | 0 | 4 | 3766 | 194656 | 22 | 1 705 | 0 | 4 | 930 | 44400 | 5 | 1 111525 | 0 | 3 | 68 | 17408 | 2 | 1 (9 rows)