如何使索引不可用然后在索引中重建 [英] How to make index unusable and then rebuilt in index
本文介绍了如何使索引不可用然后在索引中重建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个功能,可以将数千条记录插入到我当时想要不可用的索引的表中,然后我要处理该数据数据,所以我想再次重建该索引.
I have one function that insert thousands of records into table I want to unusable index at that time and then I am processing on that data data so I want to rebuilt that index again.
在Oracle中可能吗?
Is it possible in Oracle?
推荐答案
alter index idx_name unusable;
alter index idx_name rebuild;
但是您可能需要:
drop index idx_name
create [unique] index idx_name ...
这篇关于如何使索引不可用然后在索引中重建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文