Created
April 23, 2021 07:58
-
-
Save alt-odoo/b019db08b9dfff37c426a5745b76a847 to your computer and use it in GitHub Desktop.
Find big tables in Postgres
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT schemaname||'.'||tablename as table, | |
| pg_size_pretty (pg_total_relation_size(schemaname||'.'||tablename)) as size | |
| from pg_tables | |
| order by pg_total_relation_size(schemaname||'.'||tablename) desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment