select * from user_tab_comments; -- 查詢本用戶的表,視圖等。 select * from user_col_comments; -- 查詢本用戶的表的列名和註釋。
查詢全部表大小html
select Segment_Name, Sum(bytes) / 1024 / 1024 / 1024 "size(DB)" From User_Extents Group By Segment_Name order by "size(DB)" desc, Segment_Name
查詢用戶建立的表大小sql
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
範例spa
關於Oracle表壓縮.net
若是是一個已經存在的表要進行壓縮也很簡單:code
alter table table1 move compress;
若是是一個分區表的話會更加靈活,只須要壓縮你想要壓縮的表空間就能夠了:htm
alter table tables1 move partition part_1 compress;
壓縮失敗blog
ora-00439:是由於未啓用功能partitioningit
參數檢查:io
select * from v$option
Partitioning falsetable
解決方式:
Partitioning true
參考資料
https://blog.csdn.net/silenceray/article/details/78878948https://blog.csdn.net/hahalzb/article/details/6399856https://www.cnblogs.com/seasonzone/p/7206040.htmlhttps://www.cnblogs.com/zhangmen/p/4731606.html