Redshift Observatory

System Table Tracker

System view pg_catalog.svcs_query_summary version 1.0.52931 / 2023-07-07

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

View Text

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

UNION ALL

SELECT svl_query_summary.userid,
       svl_query_summary.query,
       svl_query_summary.stm,
       svl_query_summary.seg,
       svl_query_summary.step,
       svl_query_summary.maxtime,
       svl_query_summary.avgtime,
       svl_query_summary.rows,
       svl_query_summary.bytes,
       svl_query_summary.rate_row,
       svl_query_summary.rate_byte,
       svl_query_summary.label,
       svl_query_summary.is_diskbased,
       svl_query_summary.workmem,
       svl_query_summary.is_rrscan,
       svl_query_summary.is_delayed_scan,
       svl_query_summary.rows_pre_filter
FROM svl_query_summary


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