深入理解Oracle索引(2):INDEX UNIQUE SCAN,INDEX FULL SCAN和INDEX FAST FULL SCAN
㈠ INDEX UNIQUE SCAN
如果表上有唯一索引, 搜索索引列时会用上INDEX UNIQUE SCAN
原来Index Unique Scan和Index Range Scan在B Tree上的搜索路径是一样的
只是Index Unique Scan在找到应该含有要找的Index Key的block后便停止了搜索,因为该键是唯一的
而Index Range Scan还要循着指针继续找下去直到条件不满足时
Oracle9i Database Performance Tuning Guide and Reference提到:
This access path is used when all columns of a unique (B-tree) index are specified with equality conditions
下面测试一下这句话的真实性:
sys@ORCL> select index_name,blevel,leaf_blocks from user_indexes where table_name=upper('T');INDEX_NAME BLEVEL LEAF_BLOCKS------------------------------ ---------- -----------IDX_T 1 282