You are on page 1of 1

Find table size

===============

select owner,segment_name,segment_type,tablespace_name, bytes/1024/1024


MB,bytes/1024/1024/1024 GB
from dba_segments
where segment_type='TABLE'
and owner='VODAFONE_INFO';

(OR)

You can group by tablespace, owner and segment type and see the total space
occupied in MBytes

SELECT tablespace_name, owner, segment_type "Object Type",


COUNT(owner) "Number of Objects",
ROUND(SUM(bytes) / 1024 / 1024, 2) "Total Size in MB"
FROM sys.dba_segments
WHERE tablespace_name IN ('MPIS')
GROUP BY tablespace_name, owner, segment_type
ORDER BY tablespace_name, owner, segment_type;

(OR)

SELECT owner, segment_name, segment_type, partition_name, ROUND(bytes/


(1024*1024),2) SIZE_MB, tablespace_name
FROM DBA_SEGMENTS
WHERE SEGMENT_TYPE IN ('TABLE', 'TABLE PARTITION', 'TABLE SUBPARTITION',
'INDEX', 'INDEX PARTITION', 'INDEX SUBPARTITION', 'TEMPORARY', 'LOBINDEX',
'LOBSEGMENT', 'LOB PARTITION')
--AND TABLESPACE_NAME LIKE 'COSTE%'
--AND SEGMENT_NAME LIKE 'P2010201%'
--AND partition_name LIKE 'P20100201%'
--AND segment_type = 'TABLE'
--AND OWNER = 'TARGET_POC'
--AND ROUND(bytes/(1024*1024),2) > 1000
ORDER BY bytes DESC;

USer
====

select SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME,PARTITION_NAME,BYTES/1024/1024
MB,Bytes/1024/1024/1024 GB
from user_segments;
where segment_type = 'TABLE';

You might also like