Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- table_schema,
- table_name,
- pg_size_pretty(pg_table_size('"'||table_schema||'"."'||table_name||'"')) table_size,
- pg_size_pretty(pg_indexes_size('"'||table_schema||'"."'||table_name||'"')) index_size,
- pg_size_pretty(pg_relation_size('"'||table_schema||'"."'||table_name||'"')) relation_size,
- pg_size_pretty(pg_total_relation_size('"'||table_schema||'"."'||table_name||'"')) total_size
- from information_schema.tables
- order by pg_total_relation_size('"'||table_schema||'"."'||table_name||'"') desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement