Why index became invalid? (文档 ID 1576700.1)

本文摘自MOS文章,适用于Oracle数据库企业版11.2.0.2及更高版本。主要解释了索引应处于VALID状态才能被查询使用,但有时会变为UNUSABLE的原因,如DBA任务改变ROWID值需重建索引,包括表分区维护、CTAS维护、Oracle导入、SQL*Loader等操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

摘自MOS文章Why index became invalid? (文档 ID 1576700.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.

GOAL

Indexes should have status as VALID to become usable by queries however sometimes it may have status as UNUSABLE and this note explains those causes.
 

SOLUTION

Indexes can become invalid or unusable whenever a DBA tasks shifts the ROWID values, thereby requiring an index rebuild. These DBA tasks that shift table ROWID's include:

  Table partition maintenance - Alter commands (move, split or truncate partition) will shift ROWID's, making the index invalid and unusable.
  
  CTAS maintenance - Table reorganization with "alter table move" or an online table reorganization (using the dbms_redefinition package) will shift ROWIDs, creating unusable indexes.
  
  Oracle imports - An Oracle import (imp utility) with the skip_unusable_indexes=y parameter
  
  SQL*Loader (sqlldr utility) - Using direct path loads (e.g. skip_index_maintenance) will cause invalid and unusable indexes

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值