Last active
August 21, 2019 12:24
-
-
Save fljdin/1e3edf7d1ceecce3a5b048da9c9546d6 to your computer and use it in GitHub Desktop.
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 schemaname, relname, pg_size_pretty(pg_relation_size(relname::regclass)) relsize, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze | |
FROM pg_stat_user_tables | |
WHERE greatest(last_autoanalyze,last_analyze) < now()-interval '5d' | |
AND pg_relation_size(relname::regclass) > 10e6; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment