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

Monday May 13th 2002 by David Nishimoto
Share:

Two quick queries to help you size up your tables.

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
Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved