Skip to content

Instantly share code, notes, and snippets.

@andreyshuster
Last active May 24, 2022 02:56
Show Gist options
  • Save andreyshuster/47f5097313325adfba9a64a4d0b423d4 to your computer and use it in GitHub Desktop.
Save andreyshuster/47f5097313325adfba9a64a4d0b423d4 to your computer and use it in GitHub Desktop.
[PGSQL]Get rows count from 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