Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

STL_WINDOW

Analyzes query steps that execute window functions.

This table 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.

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 executed.
starttime timestamp Time in UTC that the query started executing, 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 executing, 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 execute the step.
rows bigint Total number of rows that were processed.
is_diskbased character(1) If true (t), the query was executed as a disk-based operation. If false (f), the query was executed in memory.
workmem bigint Total number of bytes in working memory that were assigned to the step.

Sample Queries

The following example returns window function results for slice 0 and segment 3.

Copy
select query, tasknum, rows, is_diskbased, workmem from stl_window where slice=0 and segment=3;

Copy
query | tasknum | rows | is_diskbased | workmem -------+---------+------+--------------+---------- 86326 | 36 | 1857 | f | 95256616 705 | 15 | 1857 | f | 95256616 86399 | 27 | 1857 | f | 95256616 649 | 10 | 0 | f | 95256616 (4 rows)