标签:空间 dex for 重建索引 ali asc rom || pac
用两种方法可以进行表的高水位回收
1.用shrink进行高水位回收(不需要重建索引,不需要额外空间)
alter table bydvmi.tpo enable row movement;
alter table bydvmi.tpo shrink space cascade;
alter table bydvmi.tpo disable row movement;
exec DBMS_STATS.GATHER_TABLE_STATS(ownname=>‘BYDVMI‘,tabname=>‘TPO‘,ESTIMATE_PERCENT=>30,method_opt=>‘for all columns size 1‘,cascade=>true,force=>true,degree=>4,no_invalidate=>FALSE);
2.用move进行高水位回收(需要重建索引,需要额外空间)
alter table wmou10tr move parallel 4;
查看索引、重建
select ‘alter index ‘||index_name||‘ rebuild parallel 4;‘ from user_indexes where table_name=upper(‘wmou10tr‘);
####执行返回值####
select ‘alter index ‘||index_name||‘ parallel 1;‘ from user_indexes where table_name=upper(‘wmou10tr‘);
####执行返回值####
exec DBMS_STATS.GATHER_TABLE_STATS(ownname=>‘BYDVMI‘,tabname=>‘TPO‘,ESTIMATE_PERCENT=>30,method_opt=>‘for all columns size 1‘,cascade=>true,force=>true,degree=>4,no_invalidate=>FALSE);
标签:空间 dex for 重建索引 ali asc rom || pac
原文地址:https://www.cnblogs.com/rikinrei/p/10750878.html