Skip to content

Instantly share code, notes, and snippets.

@zabacad
Created September 6, 2018 17:01
Show Gist options
  • Save zabacad/bb5be311e8edd58a0b5f43fa071deb33 to your computer and use it in GitHub Desktop.
Save zabacad/bb5be311e8edd58a0b5f43fa071deb33 to your computer and use it in GitHub Desktop.
PostgreSQL 9 table sizes
SELECT relname AS table_name, reltuples AS row_estimate FROM pg_class WHERE relname IN (SELECT table_name FROM information_schema.tables WHERE table_schema = 'public');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment