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

SVL_QUERY_METRICS_SUMMARY

The SVL_QUERY_METRICS_SUMMARY view shows the maximum values of metrics for completed queries. This view is derived from the STL_QUERY_METRICS system table. Use the values in this view as an aid to determine threshold values for defining query monitoring rules. For more information, see WLM Query Monitoring Rules.

This view 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 Rows

Row Name Data Type Description
userid integer ID of the user that ran the query that generated the entry.
query integer Query ID. The query column can be used to join other system tables and views.
service_class integer ID for the WLM query queue (service class). Query queues are defined in the WLM configuration. Metrics are reported only for user-defined queues.
query_cpu_time bigint CPU time used by the query, in seconds. CPU time is distinct from query run time.
query_blocks_read bigint Number of 1 MB blocks read by the query.
query_execution_time bigint Elapsed execution time for a query, in seconds. Execution time doesn’t include time spent waiting in a queue.
query_cpu_usage_percent bigint Percent of CPU capacity used by the query.
query_temp_blocks_to_disk bigint The amount of disk space used by a query to write intermediate results, in MB.
segment_execution_time bigint Elapsed execution time for a single segment, in seconds.
cpu_skew numeric(38,2) The ratio of maximum CPU usage for any slice to average CPU usage for all slices. This metric is defined at the segment level.
io_skew numeric(38,2) The ratio of maximum blocks read (I/O) for any slice to average blocks read for all slices.
scan_row_count bigint The number of rows in a scan step.
join_row_count bigint The number of rows processed in a join step.
nested_loop_join_row_count bigint The number of rows in a nested loop join.
return_row_count bigint The number of rows returned by the query.
spectrum_scan_row_count bigint The number of rows scanned by Amazon Redshift Spectrum in Amazon S3.
spectrum_scan_size_mb bigint The amount of data, in MB, scanned by Amazon Redshift Spectrum in Amazon S3.

On this page: