查看某用户的数据占用的空间大小,使用如下sql语句可以解决这个问题
SQL> select sum(bytes)/1024/1024 as sizeM from user_segments;
SQL> select owner,sum(bytes)/1024/1024 sizeM
FROM DBA_SEGMENTS
WHERE OWNER IN ('SYSTEM','SCOTT')
GROUP BY OWNER ORDER BY 2 DESC;
查看表的数据大小
select * from
(select owner,segment_name,round(sum(bytes)/1024/1024/1024,1) sizeG
from dba_segments where segment_type <> 'INDEX' and owner='FMIDC'
group by owner,segment_name order by sizeG desc)
where rownum <= 20;