函数索引使用之部分记录建索引(二)

2014-11-24 10:28:21 · 作者: · 浏览: 7
----------------------------------------- 15 recursive calls 0 db block gets 2 consistent gets 0 physical reads 0 redo size 591 bytes sent via SQL*Net to client 519 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed
--接着观察函数索引的情况 SQL> set autotrace off SQL> analyze index id_status validate structure; 索引已分析 SQL> select name,btree_space,lf_rows,height from index_stats; NAME BTREE_SPACE LF_ROWS HEIGHT ------------------------------ ----------- ---------- ---------- ID_STATUS 8000 1 1 --函数索引的要少很多
使用函数索引减少了逻辑读,一定程度提高了sql的性能。