Guest User

Untitled

a guest
Nov 18th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. -- Sort tables by size
  2. SELECT
  3. relname as "Table",
  4. pg_size_pretty(pg_total_relation_size(relid)) As "Size",
  5. pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
  6. FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
Add Comment
Please, Sign In to add comment