Listen Software’s How To: Calculating Tablespace and Table Byte Sizes

Tablespace Byte Sizes

select distinct 
       a.tablespace_name, 
sum(a.bytes) 
       as free_bytes,
sum(b.BYTES) 
       as Total_Bytes 
from dba_free_space a, 
     dba_data_files b 
Where a.tablespace_name = 
      b.tablespace_name 
group by a.tablespace_name

Table Byte Sizes

select segment_name,tablespace_name,bytes,blocks 
FROM DBA_SEGMENTS 
where segment_type='TABLE' AND TABLESPACE_NAME 
NOT IN('SYSTEM') order by bytes desc

Get the Free Newsletter!

Subscribe to Cloud Insider for top news, trends & analysis

Latest Articles