1 --查看表占空间使用情况 2 select ns.nspname || '.' || c.relname as table_name, pg_size_pretty(pg_table_size(table_name)) table_size 3 from pg_class c join pg_namespace ns on ( ns.oid = c.relnamespace ) left join pgxc_class pc on ( c.oid = pc.pcrelid ) 4 where pc.pclocatortype <> 'N' AND ns.nspname NOT IN ('pg_toast', 'pg_catalog', 'information_schema', 'cstore', 'pmk') 5 AND c.relkind = 'r' AND c.oid > 16384 order by table_size desc;
效果:
标签:DWS,占用,oid,查询,pc,pg,table,ns,size From: https://www.cnblogs.com/yingfeng2023/p/17483588.html