1、用DBA用户登录数据库。
2、以G为大小单位,查询语句:
select *
from (select owner || '.' || tablespace_name name, sum(b) gfrom (select owner,
t.segment_name,
t.partition_name,
round(bytes / 1024 / 1024 / 1024, 2) b,
tablespace_name
from dba_segments t)
where owner not in
('SYS', 'OUTLN', 'SYSTEM', 'TSMSYS', 'DBSNMP', 'WMSYS')
group by owner || '.' || tablespace_name)
order by name;
2、查看表的使用空间大小
select num_rows * avg_row_len/1024/1024
from user_tables
where table_name = 'xxxx';