天天看点

批量重建不可用索引

-- created on 2012-5-24 by administrator

declare

  cursor jl is select * from user_indexes a where a.status='unusable';

begin

   for r in jl loop

     execute immediate 'alter index '||r.index_name ||' rebuild';

   end loop;

end;

继续阅读