Script categories

Thursday, 22 September 2011

Index rebuild after compress/uncompress

create table t1 (a number) compress
-- Either compress or uncompress
alter table t1 move nocompress nologging parallel 4;
alter table t1 move compress nologging parallel 4;

Note, indexes have to be rebuilt after either dynamically decompressing or compressing
because the blocks are changed (located elsewhere)

For example, for each index on T1, rebuild

alter session force parallel query;
alter system set parallel_max_servers = 8;
alter session enable parallel ddl;
alter index indexname rebuild parallel 4 nologging;
alter session disable parallel ddl;

No comments:

Post a Comment