Skip to content

Instantly share code, notes, and snippets.

@pirey
Created August 24, 2019 16:49
Show Gist options
  • Save pirey/113d660690ada67b9c29964aff7d6735 to your computer and use it in GitHub Desktop.
Save pirey/113d660690ada67b9c29964aff7d6735 to your computer and use it in GitHub Desktop.
select row count for all tables in postgresql
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