Redshift Observatory

System Table Tracker

System view pg_catalog.svl_vacuum_percentage version 1.0.77272 / 2024-11-01

schema name column data type
pg_catalog svl_vacuum_percentage percentage int8
pg_catalog svl_vacuum_percentage table_id int4
pg_catalog svl_vacuum_percentage xid int8

View Text

SELECT s.xid,
       s.table_id,
       CASE
         WHEN s.original_blocks = 0
           THEN CAST(NULL AS bigint)
         ELSE (f.blocks * 100) / s.original_blocks
       END AS percentage
FROM (SELECT stl_vacuum.xid,
             stl_vacuum.table_id,
             sum(stl_vacuum.blocks) AS original_blocks
      FROM stl_vacuum
      WHERE stl_vacuum.status = CAST('Started' AS bpchar)
      GROUP BY stl_vacuum.xid, stl_vacuum.table_id) AS s,
     (SELECT v.xid,
             v.table_id,
             sum(v.blocks) AS blocks
      FROM stl_vacuum AS v
      WHERE v.status = CAST('Finished' AS bpchar)
      GROUP BY v.xid, v.table_id) AS f
WHERE s.xid = f.xid
  AND s.table_id = f.table_id
ORDER BY s.xid,
         s.table_id


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