Redshift Observatory

System Table Tracker

System view pg_catalog.svcs_s3requests version 1.0.46607 / 2023-02-12

schema name column data type
pg_catalog svcs_s3requests cache_status int4
pg_catalog svcs_s3requests duration_msec float8
pg_catalog svcs_s3requests etag varchar(512)
pg_catalog svcs_s3requests eventtime timestamp
pg_catalog svcs_s3requests failed int4
pg_catalog svcs_s3requests fetched int4
pg_catalog svcs_s3requests file varchar(512)
pg_catalog svcs_s3requests file_size int8
pg_catalog svcs_s3requests fingerprint int8
pg_catalog svcs_s3requests last_timeout_msec float8
pg_catalog svcs_s3requests length int8
pg_catalog svcs_s3requests location varchar(128)
pg_catalog svcs_s3requests node int4
pg_catalog svcs_s3requests num_splits int4
pg_catalog svcs_s3requests pid int4
pg_catalog svcs_s3requests query int4
pg_catalog svcs_s3requests retry_count int4
pg_catalog svcs_s3requests returned_bytes int8
pg_catalog svcs_s3requests returned_rows int8
pg_catalog svcs_s3requests row_groups int8
pg_catalog svcs_s3requests s3_scanned_bytes int8
pg_catalog svcs_s3requests s3_scanned_rows int8
pg_catalog svcs_s3requests segment int4
pg_catalog svcs_s3requests skipped_row_groups int8
pg_catalog svcs_s3requests skipped_rows int8
pg_catalog svcs_s3requests start_offset int8
pg_catalog svcs_s3requests uuid char(36)

View Text

SELECT map.primary_query AS query,
       stcs.uuid,
       stcs.pid,
       stcs.segment,
       stcs.node,
       stcs.eventtime,
       stcs.duration_msec,
       stcs.retry_count,
       stcs.returned_rows,
       stcs.returned_bytes,
       stcs.s3_scanned_rows,
       stcs.s3_scanned_bytes,
       stcs.row_groups,
       stcs.skipped_row_groups,
       stcs.skipped_rows,
       stcs.fetched,
       stcs.file_size,
       stcs.start_offset,
       stcs.length,
       CAST(stcs.location AS varchar) AS location,
       CAST(stcs.file AS varchar) AS file,
       stcs.num_splits,
       stcs.last_timeout_msec,
       stcs.failed,
       CAST(stcs.etag AS varchar) AS etag,
       stcs.fingerprint,
       stcs.cache_status
FROM (SELECT r.query,
             r.uuid,
             r.pid,
             r.segment,
             r.node,
             CAST('1970-01-01 00:00:00' AS timestamp) + (CAST((CAST(r.eventtime AS numeric) / (1000.0 * 1000.0)) + 946684800.0 AS double precision) * CAST('00:00:01' AS interval)) AS eventtime,
             round(CAST(r.duration AS double precision) / CAST(1000 AS double precision),
                   CAST(1 AS numeric)) AS duration_msec,
             r.retry_count,
             r.returned_rows,
             r.returned_bytes,
             r.s3_scanned_rows,
             r.s3_scanned_bytes,
             r.row_groups,
             r.skipped_row_groups,
             r.skipped_rows,
             r.fetched,
             r.file_size,
             r.start_offset,
             r.length,
             btrim(CAST(r.location AS text)) AS location,
             btrim(CAST(r.file_name AS text)) AS file,
             r.num_splits,
             round(CAST(r.last_timeout AS double precision) / CAST(1000 AS double precision),
                   CAST(1 AS numeric)) AS last_timeout_msec,
             r.failed,
             btrim(CAST(r.etag AS text)) AS etag,
             q.request_fingerprint AS fingerprint,
             CASE
               WHEN r.cache_status > 1
                 THEN -1
               ELSE r.cache_status
             END AS cache_status,
             r.__path,
             r.scan_type
      FROM stcs_s3requests AS r, stcs_s3query AS q
      WHERE r.__cluster_type = CAST('cs' AS bpchar)
        AND to_date(CAST(r.__log_generated_date AS text),
                    CAST('YYYYMMDD' AS text)) > (getdate() - CAST('7 days' AS interval))
        AND q.__cluster_type = CAST('cs' AS bpchar)
        AND to_date(CAST(q.__log_generated_date AS text),
                    CAST('YYYYMMDD' AS text)) > (getdate() - CAST('7 days' AS interval))
        AND r.query = q.query
        AND r.segment = q.segment
        AND r.node = q.node
        AND r.slice = q.slice) AS stcs
     INNER JOIN stcs_concurrency_scaling_query_mapping AS map ON map.concurrency_scaling_query = stcs.query
WHERE CAST(map.concurrency_scaling_cluster AS text) = split_part(CAST(stcs.__path AS text),
                                                                 CAST('/' AS text),
                                                                 10)
  AND stcs.scan_type = 2

UNION ALL

SELECT svl_s3requests.query,
       svl_s3requests.uuid,
       svl_s3requests.pid,
       svl_s3requests.segment,
       svl_s3requests.node,
       svl_s3requests.eventtime,
       svl_s3requests.duration_msec,
       svl_s3requests.retry_count,
       svl_s3requests.returned_rows,
       svl_s3requests.returned_bytes,
       svl_s3requests.s3_scanned_rows,
       svl_s3requests.s3_scanned_bytes,
       svl_s3requests.row_groups,
       svl_s3requests.skipped_row_groups,
       svl_s3requests.skipped_rows,
       svl_s3requests.fetched,
       svl_s3requests.file_size,
       svl_s3requests.start_offset,
       svl_s3requests.length,
       CAST(svl_s3requests.location AS varchar) AS location,
       CAST(svl_s3requests.file AS varchar) AS file,
       svl_s3requests.num_splits,
       svl_s3requests.last_timeout_msec,
       svl_s3requests.failed,
       CAST(svl_s3requests.etag AS varchar) AS etag,
       svl_s3requests.fingerprint,
       svl_s3requests.cache_status
FROM svl_s3requests


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