对于非唯一索引
先对索引进行 alter index index_name unusable;
然后对该表进行insert 等操作
最后 alter index index_name rebuild;
ok 一切正常而对于主键或唯一索引
先 alter index index_name unusable;
然后 insert 等操作
这里会报错 ora:01502 错误请问 主键或唯一索引可以unusable/rebuild操作吗
还是只能 先drop再create
先对索引进行 alter index index_name unusable;
然后对该表进行insert 等操作
最后 alter index index_name rebuild;
ok 一切正常而对于主键或唯一索引
先 alter index index_name unusable;
然后 insert 等操作
这里会报错 ora:01502 错误请问 主键或唯一索引可以unusable/rebuild操作吗
还是只能 先drop再create
Cause: An attempt has been made to access an index or index partition that has been ed unusable by a direct load or by a DDL operation
Action: DROP the specified index, or REBUILD the specified index, or REBUILD the unusable index partition说得很明白了。。
unique index unusable后插入会有问题
normal index unusable后依然可以插入
这个原因真不知道
unique 和主键索引 是可以rebuild 的
http://hi.baidu.com/zhwsh163/blog/item/433de7d15ee03cde562c8475.html
这说明了问题 重建索引
alter index idx_name rebuild