psql 查询所有表的大小
时间: 2023-05-19 09:04:17 浏览: 72
Oracle中使用存储过程实现分页.docx
您可以使用以下命令查询所有表的大小:
SELECT table_name, pg_size_pretty(pg_total_relation_size('"' || table_name || '"')) AS size
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY pg_total_relation_size('"' || table_name || '"') DESC;
阅读全文