Skip to content

Instantly share code, notes, and snippets.

@anhkind
Created January 15, 2016 07:09
Show Gist options
  • Save anhkind/544bca35cea4652a59bb to your computer and use it in GitHub Desktop.
Save anhkind/544bca35cea4652a59bb to your computer and use it in GitHub Desktop.
-- check the last time tables were vacuumed and analyzed
-- Ref: https://lob.com/blog/supercharge-your-postgresql-performance/
SELECT relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
FROM pg_stat_all_tables
WHERE schemaname = 'public';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment