Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

STV_WLM_QUERY_TASK_STATE - Amazon Redshift

STV_WLM_QUERY_TASK_STATE

Contains the current state of service class query tasks.

STV_WLM_QUERY_TASK_STATE 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
service_class integer ID for the service class. For a list of service class IDs, see WLM service class IDs.
task integer ID used to track a query through the workload manager. Can be associated with multiple query IDs. If a query is restarted, the query is assigned a new query ID but not a new task ID.
query integer Query ID. If a query is restarted, the query is assigned a new query ID but not a new task ID.
slot_count integer Number of WLM query slots.
start_time timestamp Time that the query began executing.
exec_time bigint Number of microseconds that the query has been executing.

Sample query

The following query displays the current state of queries in service classes greater than 4. For a list of service class IDs, see WLM service class IDs.

select * from stv_wlm_query_task_state where service_class > 4;

This query returns the following sample output:

service_class | task | query | start_time | exec_time --------------+------+-------+----------------------------+----------- 5 | 466 | 491 | 2010-10-06 13:29:23.063787 | 357618748 (1 row)
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.