Oracle查詢表佔用空間大小

一、查詢本用戶的表、視圖等

select * from user_tab_comments; 
select * from user_col_comments; 

二、查詢所有表空間的大小

select segment_name,sum(bytes)/1024/1024/1024 gb from dba_segments where  owner='用戶名' group by segment_name order by GB desc

查詢結果如下圖:
在這裏插入圖片描述

三、查詢某個用戶表空間大小

select sum(bytes)/1024/1024/1024 gb from dba_segments where  owner='用戶名' and  segment_name='表名' 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章