Rebuild Index Script

-- Rebuild index
Select 'alter index '||owner||'.'||index_name||' rebuild ONLINE;' from dba_indexes d where D.TABLE_NAME ='PROVIDE_TABLE_NAME' and D.OWNER='PROVIDE_OWNER';

-- Rebuild Partition index
Select 'alter index '||index_owner||'.'||index_name||' rebuild partition '||partition_name||' ONLINE;' from dba_ind_partitions where INDEX_NAME='PROVIDE_INDEX_NAME';

-- Rebuild Sub Partition index
Select 'alter index '||index_owner||'.'||index_name||' rebuild subpartition '||subpartition_name||' ONLINE;' from dba_ind_subpartitions where INDEX_NAME='PROVIDE_INDEX_NAME';

 

create index idx_ec_wechat_bind_open_id on nec_opr.ec_wechat_call_data_bind (open_id)  tablespace other_indx online parallel 16;

alter index idx_ec_wechat_bind_open_id noparallel;

 

posted @ 2022-03-05 13:05  baowei*blog  阅读(37)  评论(0)    收藏  举报