postgresql 查看各个数据库占用物理空间大小
2018-08-30 本文已影响0人
UU小宝
命令:
SELECT relname, age(relfrozenxid) as xid_age, pg_size_pretty(pg_table_size(oid)) as table_size FROM pg_class WHERE relkind = 'r' ORDER BY pg_table_size(oid) DESC LIMIT 20;
以上。
命令:
SELECT relname, age(relfrozenxid) as xid_age, pg_size_pretty(pg_table_size(oid)) as table_size FROM pg_class WHERE relkind = 'r' ORDER BY pg_table_size(oid) DESC LIMIT 20;
以上。