select BYTES from dba_segments
where segment_name = table_name and segment_type = 'TABLE'
这没有包括索引所占的空间哦
嗯, 把楼上segment_type改成'INDEX'就可以看到这张表上所有索引的大小了
select t.segment_name, t.segment_type, sum(t.bytes / 1024 / 1024) "占用空间(M)"
from dba_segments t
where t.segment_type='TABLE'
and t.segment_name='表名大写'
group by OWNER, t.segment_name, t.segment_type;