使用索引的误区之二:使用了 和 != 操作符,导致查询不使用索引[7]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 lunar2000 的 blog

--------------------------------------------------------------------------------

---------------------------------------------------------------------------

| id  | operation                   |  name       | rows  | bytes | cost  |

---------------------------------------------------------------------------

|   0 | select statement            |             |       |       |       |

|   1 |  table access by index rowid| dept        |       |       |       |

|*  2 |   index range scan          | dept_id1    |       |       |       |

---------------------------------------------------------------------------

predicate information (identified by operation id):

---------------------------------------------------

   2 - access("dept"."dname">'developer' and "dept"."dname"<'developer')

note: rule based optimization

 

15 rows selected

本文关键:使用索引的误区之二:使用了 和 != 操作符,导致查询不使用索引
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top