常用命令

1.查看指定schema中各表占空间大小

   
   
   
   
SELECT relname , pg_size_pretty( pg_relation_size(relid) ) FROM pg_stat_user_tables WHERE schemaname = ' public ' ORDER BY pg_relation_size(relid) DESC ;

你可能感兴趣的:(常用命令)