Skip to content

Instantly share code, notes, and snippets.

@jensblond
Created January 5, 2015 16:45
Show Gist options
  • Save jensblond/2c29e4f1d03c72030515 to your computer and use it in GitHub Desktop.
Save jensblond/2c29e4f1d03c72030515 to your computer and use it in GitHub Desktop.
Get all counts of all tables in a postgres
SELECT schemaname,relname,n_live_tup
FROM pg_stat_user_tables
ORDER BY n_live_tup DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment