Null 对 Index 的阴谋
今天在测试过程中遇到一问题, SQL该走Index的,没走. 加index hint也不行. 描述如下:1. 建立测试表create table t1asselect object_id, object_name from dba_objects;2. 在object_name列上建立b-tree indexcreate index idx_t1_name on t1(object_name);3. 如果我是select object_name from t1, 按理说CBO应该会选择走Index scan. 但奇怪的是结果走的full table scan.SQL> set autotrace trace expSQL> select object_name from t1;Execution Plan----------------------------------------------------------Plan hash value: 3617