STV_WLM_SERVICE_CLASS_STATE - Amazon Redshift
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

STV_WLM_SERVICE_CLASS_STATE

Contains the current state of the service classes.

STV_WLM_SERVICE_CLASS_STATE is visible only to superusers. 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.
num_queued_queries integer Number of queries currently in the queue.
num_executing_queries integer Number of queries currently executing.
num_serviced_queries integer Number of queries that have ever been in the service class.
num_executed_queries integer Number of queries that have executed since Amazon Redshift was restarted.
num_evicted_queries integer Number of queries that have been evicted since Amazon Redshift was restarted. Some of the reasons for an evicted query include a WLM timeout, a QMR hop action, and a query failing on a concurrency scaling cluster.
num_concurrency_scaling_queries integer Number of queries run on a concurrency scaling cluster since Amazon Redshift was restarted.

Sample query

The following query displays the state for service classes greater than 5. For a list of service class IDs, see WLM service class IDs.

select service_class, num_executing_queries, num_executed_queries from stv_wlm_service_class_state where service_class > 5 order by service_class;
service_class | num_executing_queries | num_executed_queries ---------------+-----------------------+---------------------- 6 | 1 | 222 7 | 0 | 135 8 | 1 | 39 (3 rows)