1.查看指定schema中各表占空间大小
SELECT relname , pg_size_pretty( pg_relation_size(relid) ) FROM pg_stat_user_tables WHERE schemaname = ' public ' ORDER BY pg_relation_size(relid) DESC ;
本文共 223 字,大约阅读时间需要 1 分钟。
1.查看指定schema中各表占空间大小
SELECT relname , pg_size_pretty( pg_relation_size(relid) ) FROM pg_stat_user_tables WHERE schemaname = ' public ' ORDER BY pg_relation_size(relid) DESC ;
转载于:https://my.oschina.net/zjoschina/blog/223190