Redshift Observatory

System Table Tracker

System view pg_catalog.svv_tables_space_usage version 1.0.74159 / 2024-09-10

schema name column data type
pg_catalog svv_tables_space_usage capacity int8
pg_catalog svv_tables_space_usage datasharing_tables_space_used int8
pg_catalog svv_tables_space_usage local_perm_tables_space_used int8
pg_catalog svv_tables_space_usage local_temp_tables_space_used int8
pg_catalog svv_tables_space_usage node int4

View Text

SELECT node_slice_mapping.node,
       node_capacity.capacity,
       sum(CASE
             WHEN tbl_perm_blockcounts.temp = 0
              AND tbl_perm_blockcounts.id > 100003
              AND soid_map.storage_oid IS NULL
               THEN tbl_perm_blockcounts.block_count
             ELSE 0
           END) AS local_perm_tables_space_used,
       sum(CASE
             WHEN tbl_perm_blockcounts.temp = 1
              AND soid_map.storage_oid IS NULL
               THEN tbl_perm_blockcounts.block_count
             ELSE 0
           END) AS local_temp_tables_space_used,
       sum(CASE
             WHEN soid_map.storage_oid IS NOT NULL
               THEN tbl_perm_blockcounts.block_count
             ELSE 0
           END) AS datasharing_tables_space_used
FROM stv_tbl_perm AS tbl_perm_blockcounts
     INNER JOIN stv_slices AS node_slice_mapping USING (slice)
     LEFT JOIN stv_storage_oid_map AS soid_map ON tbl_perm_blockcounts.id = soid_map.storage_oid
     LEFT JOIN stv_node_storage_capacity AS node_capacity ON node_slice_mapping.node = node_capacity.node
GROUP BY node_slice_mapping.node, node_capacity.capacity
ORDER BY node_slice_mapping.node


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