您好,登錄后才能下訂單哦!
從oracle 12.1.0.2版本起,創建索引時可以通過COMPRESS ADVANCED LOW對index進行壓縮
語法
create index index_name on table_name(col_name) COMPRESS ADVANCED LOW;
alter index index_name REBUILD COMPRESS ADVANCED LOW;
壓縮空間對比
create table ddeng as select * from dba_objects; create index idx_ddeng on ddeng(object_id,object_name,owner); -- 暫用空間大小 SQL> select segment_name,bytes/1024/1024 from dba_segments where segment_name = 'IDX_DDENG'; SEGMENT_NAME BYTES/1024/1024 -------------------- --------------- IDX_DDENG 80 -- 壓縮后 SQL> alter index idx_ddeng REBUILD COMPRESS ADVANCED LOW; Index altered. SQL> select segment_name,bytes/1024/1024 from dba_segments where segment_name = 'IDX_DDENG'; SEGMENT_NAME BYTES/1024/1024 -------------------- --------------- IDX_DDENG 22
啟用COMPRESS ADVANCED LOW 在 dba_indexes.compression 值顯示為Enable
Note:
Advanced index compression is not supported for bitmap indexes or index-organized tables.
Advanced index compression cannot be specified on a single column unique index.
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。