设为首页 加入收藏

TOP

Oraclealterindexdisable/unusable的区别(二)
2015-11-21 01:56:10 来源: 作者: 【 】 浏览:1
Tags:Oraclealterindexdisable/unusable 区别
--------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access(TO_CHAR("OBJECT_ID")='20')
统计信息
----------------------------------------------------------
24 recursive calls
0 db block gets
5 consistent gets
1 physical reads
0 redo size
910 bytes sent via SQL*Net to client
327 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed


SQL> alter index ind_t_object_id disable;
索引已更改。
SQL> select * from test where to_char(object_id) = '20';
select * from test where to_char(object_id) = '20'
*
第 1 行出现错误:

ORA-30554: 基于函数的索引FWMS4GZ_DEV_DDL.IND_T_OBJECT_ID被禁用

官方文档:

DISABLE Clause:
DISABLE applies only to a function-based index. This clause lets you disable the use of a function-based index. You might want to do so, for example, while working on the body of the function. Afterward you can either rebuild the index or specify another ALTER INDEX statement with the ENABLE keyword.


UNUSABLE Clause:
UNUSABLE Clause Specify UNUSABLE to mark the index or index partition(s) or index subpartition(s) UNUSABLE. An unusable index must be rebuilt, or dropped and re-created, before it can be used. While one partition is marked UNUSABLE, the other partitions of the index are still valid. You can execute statements that require the index if the statements do not access the unusable partition. You can also split or rename the unusable partition before rebuilding it.

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle备份工具、文件命名格式、r.. 下一篇修改ORACLE的字段顺序

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: