📅  最后修改于: 2022-03-11 15:05:24.290000             🧑  作者: Mango
SELECT sum(BYTES) / 1e6 AS SIZE_MB FROM DBA_SEGMENTS WHERE OWNER = 'schema_name';
-- By type
SELECT SEGMENT_TYPE, sum(BYTES) / 1e6 AS SIZE_MB FROM DBA_SEGMENTS
WHERE OWNER = 'schema_name' GROUP BY SEGMENT_TYPE;
-- By schema
SELECT OWNER, sum(BYTES) / 1e6 AS SIZE_MB FROM DBA_SEGMENTS GROUP BY OWNER
ORDER BY SIZE_MB DESC;