Skip to content

Instantly share code, notes, and snippets.

@david-pm
Last active January 16, 2018 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david-pm/a5c373f77a7e1750e01a5d9fd985f285 to your computer and use it in GitHub Desktop.
Save david-pm/a5c373f77a7e1750e01a5d9fd985f285 to your computer and use it in GitHub Desktop.
psql - see when tables were last vacuumed and analyzed
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