size of all tables in a schema oracle
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;