0
点赞
收藏
分享

微信扫一扫

Resolve Dependencies of Function-Based Indexes【每日一译】--20121213

米小格儿 2023-05-24 阅读 87


Resolve Dependencies of Function-Based Indexes 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:

解决基于函数索引依赖性,一个函数索引取决于这个索引上的任何函数。如果函数或者包含

函数的包体的定义重定义(或者如果索引的拥有者的EXECUTE权限被收回),那么以下条件将

保持 :

■ 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.

#索引被标记为DISABLED.

#查询在DISABLED索引将失败如果优化器选择使用这个索引。

#DML操作在一个DISABLED索引上表将失败除非索引被标记为UNUSABLE并且初始化参数

SKIP_UNUSABLE_INDEXES设置为TRUE.

为了重新启动索引在一个函数改变后,可以使用ALTER INDEX...ENABLE语句。


---------------------------------------------操作记录-----------------------------------------------

SQL> update a set comoon='dd' where object_id=28;
update a set comoon='dd' where object_id=28
*
ERROR at line 1:
ORA-30554: function-based index AIKI.IDX_001 is disabled


SQL> alter index idx_001 unusable;

Index altered.

SQL> update a set comoon='dd' where object_id=28;

1 row updated.

SQL> rollback;

举报

相关推荐

0 条评论