Last active
December 8, 2016 20:59
-
-
Save rgolangh/049cff30b89c5b29284ceee80a35dbb4 to your computer and use it in GitHub Desktop.
Report postgres user tables stats order by dead rows count
This file contains 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_tup_upd, | |
n_tup_del, | |
n_tup_hot_upd, | |
n_dead_tup, | |
last_vacuum, | |
last_autovacuum, | |
last_analyze, | |
last_autoanalyze, | |
vacuum_count, | |
autovacuum_count, | |
autoanalyze_count | |
FROM pg_stat_user_tables | |
ORDER BY n_dead_tup | |
DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment