A function-based index depends on any function that it is using. If the function or
the specification of a package containing the function is redefined (or if the index owner’s
EXECUTE privilege is revoked), then the following conditions hold:
■ The index is marked as DISABLED.
■ Queries on a DISABLED index fail if the optimizer chooses to use the index.
■ DML operations on a DISABLED index fail unless the index is also marked
UNUSABLE and the initialization parameter SKIP_UNUSABLE_INDEXES is set to
true.
To re-enable the index after a change to the function, use the ALTER INDEX ... ENABLE
statement.
解决函数索引的依赖性
1. 如果函数索引中的函数或者包含该函数的包重新定义 ,以及索引拥有者的EXECUTE权限被回收 ,则
a. 索引被标记为失效
b. 优化器如果选择使用索引 , 利用该索引上的查询失效
c. 如果索引被标记为UNUSABLE , 或者初始化参数SKIP_UNUSABLE_INDEXES为true , 则失效索引上的dml操作是失败的
2. 当函数变更后 , 可以使用ALTER INDEX ... ENABLE来使索引ENABLE
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-982491/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10599713/viewspace-982491/