[Oracle] - 查看数据库中每个表占用空间大小
查询用户创建的表
select * from user_tab_comments; -- 查询本用户的表,视图等。 select * from user_col_comments; -- 查询本用户的表的列名和注释。
查询所有表大小
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。select Segment_Name, Sum(bytes) / 1024 / 1024 / 1024 "size(DB)" From User_Extents Group By Segment_Name order by "size(DB)" desc, Segment_Name
查询用户创建的表大小
select UT.table_name, x.TABLE_SIZE from user_tab_comments ut, (select Segment_Name, Sum(bytes) / 1024 / 1024 / 1024 as "TABLE_SIZE" From User_Extents Group By Segment_Name) x where ut.table_type = 'TABLE' and ut.table_name = x.Segment_Name(+) order by x.TABLE_SIZE desc
范例
参考资料
https://blog.csdn.net/silenceray/article/details/78878948
https://blog.csdn.net/hahalzb/article/details/6399856

更多精彩