Answers for "oracle sql get table size"

SQL
2

oracle table size

SELECT e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME, sum(e.bytes) / 1048576 AS Megs
FROM dba_extents e
WHERE
  e.OWNER = 'SCHEME_NAME' AND
  e.TABLESPACE_NAME = 'TBS_NAME' AND
  e.SEGMENT_NAME IN ('TABLE_NAME')
GROUP BY e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME
ORDER BY e.TABLESPACE_NAME, e.SEGMENT_NAME;
Posted by: Guest on April-26-2021
0

oracle db get table sizes

select segment_name, sum(bytes)/1024 KB 
from user_segments 
where segment_type='TABLE' and segment_name in (SELECT TABLE_NAME FROM ALL_TABLES) 
group by segment_name order by KB desc;
Posted by: Guest on April-28-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language