Redshift Research Project

System Table Tracker

System view pg_catalog.svl_query_summary version 1.0.44903 / 2022-12-19

schema name column data type
pg_catalog svl_query_summary avgtime int8
pg_catalog svl_query_summary bytes int8
pg_catalog svl_query_summary is_delayed_scan char(1)
pg_catalog svl_query_summary is_diskbased char(1)
pg_catalog svl_query_summary is_rrscan char(1)
pg_catalog svl_query_summary label varchar(164)
pg_catalog svl_query_summary maxtime int8
pg_catalog svl_query_summary query int4
pg_catalog svl_query_summary rate_byte float8
pg_catalog svl_query_summary rate_row float8
pg_catalog svl_query_summary rows int8
pg_catalog svl_query_summary rows_pre_filter int8
pg_catalog svl_query_summary seg int4
pg_catalog svl_query_summary step int4
pg_catalog svl_query_summary stm int4
pg_catalog svl_query_summary userid int4
pg_catalog svl_query_summary workmem int8

View Text

SELECT svl_query_report.userid,
       svl_query_report.query,
       stl_stream_segs.stream AS stm,
       svl_query_report.segment AS seg,
       svl_query_report.step,
       max(svl_query_report.elapsed_time) AS maxtime,
       avg(svl_query_report.elapsed_time) AS avgtime,
       sum(svl_query_report.rows) AS rows,
       sum(svl_query_report.bytes) AS bytes,
       round(CAST(sum(svl_query_report.rows) / CASE
                                                 WHEN CAST(date_part(CAST('epoch' AS text),
                                                                     max(svl_query_report.end_time - svl_query_report.start_time)) AS bigint) = 0
                                                   THEN CAST(NULL AS bigint)
                                                 ELSE CAST(date_part(CAST('epoch' AS text),
                                                                     max(svl_query_report.end_time - svl_query_report.start_time)) AS bigint)
                                               END AS double precision)) AS rate_row,
       round(CAST(sum(svl_query_report.bytes) / CASE
                                                  WHEN CAST(date_part(CAST('epoch' AS text),
                                                                      max(svl_query_report.end_time - svl_query_report.start_time)) AS bigint) = 0
                                                    THEN CAST(NULL AS bigint)
                                                  ELSE CAST(date_part(CAST('epoch' AS text),
                                                                      max(svl_query_report.end_time - svl_query_report.start_time)) AS bigint)
                                                END AS double precision)) AS rate_byte,
       svl_query_report.label,
       svl_query_report.is_diskbased,
       sum(svl_query_report.workmem) AS workmem,
       svl_query_report.is_rrscan,
       svl_query_report.is_delayed_scan,
       sum(svl_query_report.rows_pre_filter) AS rows_pre_filter
FROM svl_query_report, stl_stream_segs
WHERE svl_query_report.query = stl_stream_segs.query
  AND svl_query_report.segment = stl_stream_segs.segment
GROUP BY svl_query_report.userid, svl_query_report.query, stl_stream_segs.stream, svl_query_report.segment, svl_query_report.step, svl_query_report.label, svl_query_report.is_diskbased, svl_query_report.is_rrscan, svl_query_report.is_delayed_scan


Home 3D Друк Blog Bring-Up Times Consultancy Cross-Region Benchmarks Email Forums IRC Mailing Lists Reddit Redshift Price Tracker Redshift Version Tracker Redshift Workbench System Table Tracker The Known Universe Twitter White Papers