赞
踩
select relpages*8/1024||'M' as 占用空间,reltuples 记录数 from pg_class where relname='表名';
select pg_database.datname, pg_size_pretty (pg_database_size(pg_database.datname)) AS size
from pg_database WHERE pg_database.datname = '指定的库名称'
SELECT table_schema || '.' || table_name AS table_full_name, pg_total_relation_size('"' || table_schema || '"."' || table_name || '"')AS size
FROM information_schema.tables WHERE table_schema = 'public'
ORDER BY
pg_total_relation_size('"' || table_schema || '"."' || table_name || '"') DESC
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。