SQL> create table test as select * from dba_objects;
Table created
SQL> create index test_object_id on test(object_id);
Index created
SQL> create index test_data_object_id on test(data_object_id,1);
----------data_object_id是一个number类型,但是使用1就会报错-----------
Index created
SQL> exec dbms_stats.gather_table_stats(user,'TEST');
begin dbms_stats.gather_table_stats(user,'TEST'); end;
ORA-00600: 内部错误代码, 参数: [qkssao2s1], [], [], [], [], [], [], []
ORA-06512: 在 "SYS.DBMS_STATS", line 13056
ORA-06512: 在 "SYS.DBMS_STATS", line 13076
ORA-06512: 在 line 1
SQL> drop index test_data_object_id;
Index dropped
SQL> exec dbms_stats.gather_table_stats(user,'TEST');
PL/SQL procedure successfully completed
SQL> create index test_data_object_id on test(data_object_id,1);
Index created
SQL> exec dbms_stats.gather_index_stats(user,'TEST_DATA_OBJECT_ID');
begin dbms_stats.gather_index_stats(user,'TEST_DATA_OBJECT_ID'); end;
ORA-03001: 未实施的功能
ORA-06512: 在 "SYS.DBMS_STATS", line 10621
ORA-06512: 在 "SYS.DBMS_STATS", line 10645
ORA-06512: 在 line 1
SQL> exec dbms_stats.gather_index_stats(user,'TEST_DATA_OBJECT_ID');
begin dbms_stats.gather_index_stats(user,'TEST_DATA_OBJECT_ID'); end;
ORA-03001: 未实施的功能
ORA-06512: 在 "SYS.DBMS_STATS", line 10621
ORA-06512: 在 "SYS.DBMS_STATS", line 10645
ORA-06512: 在 line 1
SQL> exec dbms_stats.gather_index_stats(user,'TEST_OBJECT_ID');
PL/SQL procedure successfully completed
SQL> drop index test_data_object_id;
Index dropped
SQL> create index test_data_object_id on test(data_object_id,'a');
Index created
---------------------改为'a'正常---------------------------
SQL> exec dbms_stats.gather_table_stats(user,'TEST');
PL/SQL procedure successfully completed
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10805681/viewspace-616154/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10805681/viewspace-616154/