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

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)

On this page: