Redshift Observatory

System Table Tracker

System view pg_catalog.svcs_s3client version 1.0.72503 / 2024-08-11

schema name column data type
pg_catalog svcs_s3client app_connect_time int8
pg_catalog svcs_s3client bucket char(64)
pg_catalog svcs_s3client compression_time int8
pg_catalog svcs_s3client connect_time int8
pg_catalog svcs_s3client data_size int8
pg_catalog svcs_s3client end_time int8
pg_catalog svcs_s3client extended_request_id char(128)
pg_catalog svcs_s3client http_method char(64)
pg_catalog svcs_s3client ip_address char(64)
pg_catalog svcs_s3client key char(256)
pg_catalog svcs_s3client pid int4
pg_catalog svcs_s3client query int4
pg_catalog svcs_s3client recordtime timestamp
pg_catalog svcs_s3client request_id char(32)
pg_catalog svcs_s3client retries int4
pg_catalog svcs_s3client start_time int8
pg_catalog svcs_s3client transfer_size int8
pg_catalog svcs_s3client transfer_time int8
pg_catalog svcs_s3client userid int4

View Text

SELECT stcs.userid,
       map.primary_query AS query,
       CAST('1970-01-01 00:00:00' AS timestamp) + (CAST((CAST(stcs.recordtime AS numeric) / (1000.0 * 1000.0)) + 946684800.0 AS double precision) * CAST('00:00:01' AS interval)) AS recordtime,
       stcs.pid,
       stcs.http_method,
       stcs.bucket,
       stcs.key,
       stcs.transfer_size,
       stcs.data_size,
       stcs.start_time,
       stcs.end_time,
       stcs.transfer_time,
       stcs.compression_time,
       stcs.connect_time,
       stcs.app_connect_time,
       stcs.retries,
       stcs.request_id,
       stcs.extended_request_id,
       stcs.ip_address
FROM stcs_s3client AS stcs
     INNER JOIN stcs_concurrency_scaling_query_mapping AS map ON map.concurrency_scaling_query = stcs.query
WHERE stcs.__cluster_type = CAST('cs' AS bpchar)
  AND to_date(CAST(stcs.__log_generated_date AS text),
              CAST('YYYYMMDD' AS text)) > (getdate() - CAST('7 days' AS interval))
  AND to_date(CAST(map.__log_generated_date AS text),
              CAST('YYYYMMDD' AS text)) > (getdate() - CAST('7 days' AS interval))
  AND CAST(map.concurrency_scaling_cluster AS text) = split_part(CAST(stcs.__path AS text),
                                                                 CAST('/' AS text),
                                                                 10)
  AND (EXISTS (SELECT 1
               FROM pg_user
               WHERE pg_user.usename = CAST("current_user"() AS name)
                 AND pg_user.usesuper = TRUE)
    OR EXISTS (SELECT 1
               FROM pg_shadow_extended
               WHERE pg_shadow_extended.sysid = current_user_id()
                 AND pg_shadow_extended.colnum = 2
                 AND pg_shadow_extended.value = CAST(-1 AS text))
    OR stcs.userid = current_user_id())

UNION ALL

SELECT stl_s3client.userid,
       stl_s3client.query,
       stl_s3client.recordtime,
       stl_s3client.pid,
       stl_s3client.http_method,
       stl_s3client.bucket,
       stl_s3client.key,
       stl_s3client.transfer_size,
       stl_s3client.data_size,
       stl_s3client.start_time,
       stl_s3client.end_time,
       stl_s3client.transfer_time,
       stl_s3client.compression_time,
       stl_s3client.connect_time,
       stl_s3client.app_connect_time,
       stl_s3client.retries,
       stl_s3client.request_id,
       stl_s3client.extended_request_id,
       stl_s3client.ip_address
FROM stl_s3client


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