Created
March 23, 2017 14:23
-
-
Save areguig/ce4ac690b3e99ea16a13cc84211ab62e to your computer and use it in GitHub Desktop.
Estimated dead rows, initiated sequences and indexes scans on tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select relname,(n_dead_tup+n_live_tup) as estimated_total_rows, n_dead_tup as estimated_dead_rows, | |
seq_scan,idx_scan | |
from pg_catalog.pg_stat_all_tables | |
where n_dead_tup > 0 | |
-- and relname = '<TABLE_NAME>' | |
and schemaname='<SCHEMA_NAME>' | |
order by n_dead_tup desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment