Redshift Observatory

System Table Tracker

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

schema name column data type
pg_catalog pg_stat_all_tables idx_scan int8
pg_catalog pg_stat_all_tables idx_tup_fetch int8
pg_catalog pg_stat_all_tables n_tup_del int8
pg_catalog pg_stat_all_tables n_tup_ins int8
pg_catalog pg_stat_all_tables n_tup_upd int8
pg_catalog pg_stat_all_tables relid oid
pg_catalog pg_stat_all_tables relname name
pg_catalog pg_stat_all_tables schemaname name
pg_catalog pg_stat_all_tables seq_scan int8
pg_catalog pg_stat_all_tables seq_tup_read int8

View Text

SELECT c.oid AS relid,
       n.nspname AS schemaname,
       c.relname,
       pg_stat_get_numscans(c.oid) AS seq_scan,
       pg_stat_get_tuples_returned(c.oid) AS seq_tup_read,
       sum(pg_stat_get_numscans(i.indexrelid)) AS idx_scan,
       sum(pg_stat_get_tuples_fetched(i.indexrelid)) AS idx_tup_fetch,
       pg_stat_get_tuples_inserted(c.oid) AS n_tup_ins,
       pg_stat_get_tuples_updated(c.oid) AS n_tup_upd,
       pg_stat_get_tuples_deleted(c.oid) AS n_tup_del
FROM pg_class AS c
     LEFT JOIN pg_index AS i ON c.oid = i.indrelid
     LEFT JOIN pg_namespace AS n ON n.oid = c.relnamespace
WHERE c.relkind = CAST('r' AS "char")
GROUP BY c.oid, n.nspname, c.relname


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