STL_MERGE
Analyzes merge execution steps for queries. These steps occur when the results of parallel operations (such as sorts and joins) are merged for subsequent processing.
STL_MERGE 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_MERGE 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. |
Sample queries
The following example returns 10 merge execution results.
select query, step, starttime, endtime, tasknum, rows from stl_merge limit 10;
query | step | starttime | endtime | tasknum | rows -------+------+---------------------+---------------------+---------+------ 9 | 0 | 2013-08-12 20:08:14 | 2013-08-12 20:08:14 | 0 | 0 12 | 0 | 2013-08-12 20:09:10 | 2013-08-12 20:09:10 | 0 | 0 15 | 0 | 2013-08-12 20:10:24 | 2013-08-12 20:10:24 | 0 | 0 20 | 0 | 2013-08-12 20:11:27 | 2013-08-12 20:11:27 | 0 | 0 26 | 0 | 2013-08-12 20:12:28 | 2013-08-12 20:12:28 | 0 | 0 32 | 0 | 2013-08-12 20:14:33 | 2013-08-12 20:14:33 | 0 | 0 38 | 0 | 2013-08-12 20:16:43 | 2013-08-12 20:16:43 | 0 | 0 44 | 0 | 2013-08-12 20:17:05 | 2013-08-12 20:17:05 | 0 | 0 50 | 0 | 2013-08-12 20:18:48 | 2013-08-12 20:18:48 | 0 | 0 56 | 0 | 2013-08-12 20:20:48 | 2013-08-12 20:20:48 | 0 | 0 (10 rows)