赞
踩
select pg_database_size('【数据库名】');
select pg_database.datname,
pg_size_pretty (pg_database_size(pg_database.datname))
AS size
from pg_database;
select indexrelname, pg_size_pretty(pg_relation_size(relid))
from pg_stat_user_indexes
where schemaname='public'
order by pg_relation_size(relid) desc;
select relname, pg_size_pretty(pg_relation_size(relid))
from pg_stat_user_tables
where schemaname='public'
order by pg_relation_size(relid) desc;
select relname, pg_size_pretty(pg_relation_size(relid))
from pg_stat_user_tables
where schemaname='public' and relname='【表名】'
order by pg_relation_size(relid) desc;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。