常见的“ORA-01502: index 'XXXXXXXX' or partition of such index is in unusable state”错误。
检查一下索引状态,我们会注意到索引已经是“UNUSABLE”了。
select index_name, index_type, tablespace_name, table_type, status
from user_indexes
where index_name = 'YOUR_INDEX_NAME';
解决办法,重建索引:
ALTER INDEX YOUR_INDEX_NAME REBUILD;