pg_stat_all_tables

The pg_stat_all_tables view shows one row for each table in the current database (including TOAST tables) to display statistics about accesses to that specific table.

The pg_stat_user_tables and pg_stat_sys_table views contain the same information, but filtered to only show user and system tables respectively.

ColumnTypeDescription
relidoidOID of a table
schemanamenameName of the schema that this table is in
relnamenameName of this table
seq_scanbigintTotal number of sequential scans initiated on this table from all segment instances
seq_tup_readbigintNumber of live rows fetched by sequential scans
idx_scanbigintTotal number of index scans initiated on this table from all segment instances
idx_tup_fetchbigintNumber of live rows fetched by index scans
n_tup_insbigintNumber of rows inserted
n_tup_updbigintNumber of rows updated (includes HOT updated rows)
n_tup_delbigintNumber of rows deleted
n_tup_hot_updbigintNumber of rows HOT updated (i.e., with no separate index update required)
n_live_tupbigintEstimated number of live rows
n_dead_tupbigintEstimated number of dead rows
n_mod_since_analyzebigintEstimated number of rows modified since this table was last analyzed
last_vacuumtimestamp with time zoneLast time this table was manually vacuumed (not counting VACUUM FULL)
last_autovacuumtimestamp with time zoneLast time this table was vacuumed by the autovacuum daemon1
last_analyzetimestamp with time zoneLast time this table was manually analyzed
last_autoanalyzetimestamp with time zoneLast time this table was analyzed by the autovacuum daemon1
vacuum_countbigintNumber of times this table has been manually vacuumed (not counting VACUUM FULL)
autovacuum_countbigintNumber of times this table has been vacuumed by the autovacuum daemon1
analyze_countbigintNumber of times this table has been manually analyzed
autoanalyze_countbigintNumber of times this table has been analyzed by the autovacuum daemon 1

Note

1In Greenplum Database, the autovacuum daemon is deactivated and not supported for user defined databases.

Parent topic: System Catalogs Definitions