SVL_QUERY_METRICS_SUMMARY - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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 about rules and metrics for query monitoring for Amazon Redshift, see WLM query monitoring rules.

SVL_QUERY_METRICS_SUMMARY 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.

Some or all of the data in this table can also be found in the SYS monitoring view SYS_QUERY_DETAIL. The data in the SYS monitoring view is formatted to be easier to use and understand. We recommend that you use the SYS monitoring view for your queries.

Table columns

Column 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. For a list of service class IDs, see WLM service class IDs.
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 numeric(38,2) 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. The row count is the total number of rows emitted before filtering rows marked for deletion (ghost rows) and before applying user-defined query filters.
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.
query_queue_time bigint The amount of time in seconds that the query was queued.