Skip to content

Instantly share code, notes, and snippets.

@sao
Last active December 21, 2015 01:09
Show Gist options
  • Save sao/6225980 to your computer and use it in GitHub Desktop.
Save sao/6225980 to your computer and use it in GitHub Desktop.
count rows for all tables
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