返回顶部

欢迎来到菜鸟大明儿哥的博客

我们一起交流学习,不断提升自我

ORACLE查看表占用空间的大小

查询object的大小,按照降序排序

select  * from user_segments s  where s.BYTES  is not null  order by s.BYTES desc 

 

 

select a.segment_name,

a.segment_type,

a.bytes,

a.bytes / 1024 / 1024 byte_m,

b.created

from dba_segments a

inner join all_objects b

on b.object_type = 'TABLE'

and a.owner = b.owner

and a.segment_name = b.object_name

where a.owner = '用户名'

and a.segment_type = 'TABLE' /* and a.bytes>50000000*/

order by a.bytes desc;

 

 

posted @ 2020-05-07 16:04  菜鸟大明儿哥  阅读(1828)  评论(0编辑  收藏  举报