查看pgsql表容量

2019-10-08  本文已影响0人  乔治大叔

SELECT
table_schema || '.' || table_name AS table_full_name,
pg_size_pretty(pg_total_relation_size('"' || table_schema || '"."' || table_name || '"')) AS size
FROM information_schema.tables
ORDER BY
pg_total_relation_size('"' || table_schema || '"."' || table_name || '"') DESC

上一篇 下一篇

猜你喜欢

热点阅读