Monday, June 12, 2023

Query to check top 15 Largest Segments and Larger than 10G segments

 Top 15  Largest Segments:

SELECT * FROM (select SEGMENT_NAME, SEGMENT_TYPE, BYTES/1024/1024/1024 GB, TABLESPACE_NAME from dba_segments order by 3 desc ) WHERE ROWNUM <= 15;

larger than 10G segments:

set lines 300 pages 900
col owner for a20
col segment_name for a35
col segment_type for a17
select owner, segment_name, segment_type, sum(bytes)/1024/1024/1024 object_size_GB from dba_segments where bytes>10737418240 group by owner, segment_name, segment_type order by 4;

No comments:

Post a Comment

Find the external table details along with dirctories

col OWNER for a20 col TABLE_NAME for a30 col DIRECTORY_PATH for a50 set lines 250 pages 100 select a.OWNER,TABLE_NAME,DEFAULT_DIRECTORY_NAME...