Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Sort tables by size
- SELECT
- relname as "Table",
- pg_size_pretty(pg_total_relation_size(relid)) As "Size",
- pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
- FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
Add Comment
Please, Sign In to add comment