注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 IB客座主编(四)美国西蒙公..
 帮助

alter session set skip_unusable_indexes=true


2007-07-11 09:17:32
 标签:unusable   [推送到技术圈]

1.
alter session set skip_unusable_indexes=true;
2. 请问如何恢复unusable的索引
2.1
SQL> create table test as select * from all_objects;
 
Table created.
 
SQL> create index t_owner_ind on test(owner);
 
Index created.
 
SQL> alter index t_owner_ind unusable;
 
Index altered.
 
SQL> drop index t_owner_ind;
 
Index dropped.
 
SQL>
2.2
SQL> create table test as select * from sys.dba_objects;
 
Table created.
 
SQL> alter table test add constraint unique_id unique(object_id);
 
Table altered.
 
SQL> select index_name from user_indexes where lowercase(table_name)='test';
select index_name from user_indexes where lowercase(table_name)='test'
*
ERROR at line 1:
ORA-00904: "LOWERCASE": invalid identifier
 
 
SQL> select index_name from user_indexes where lower(table_name)='test';
 
INDEX_NAME
------------------------------
UNIQUE_ID
 
SQL> select segment_name from user_segments;
 
SEGMENT_NAME
--------------------------------------------------------------------------------
UNIQUE_ID
TEST_CON
TEST
SALGRADE
BONUS
PK_EMP
EMP
PK_DEPT
DEPT
 
9 rows selected.
 
SQL> alter table test drop constraint unique_id;
 
Table altered.
 
SQL> select index_name from user_indexes where lower(table_name)='test';
 
no rows selected
 
SQL> select segment_name from user_segments;
 
SEGMENT_NAME
--------------------------------------------------------------------------------
TEST_CON
TEST
SALGRADE
BONUS
PK_EMP
EMP
PK_DEPT
DEPT
 
8 rows selected.
 
SQL>
 
不存在unique_id segment

3. skip_unusable_indexes使用的几点补充- -

4. ORA-01502 state unusable错误成因和解决方法()
5. SKIP_UNUSABLE_INDEXES的使用与索引实效解决方法




    文章评论
 
2007-07-11 22:30:00
SKIP_UNUSABLE_INDEXES的使用与索引实效解决方法
要看这个

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: