您的位置:首页 > 其它

索引是怎样提高查询的速度的,原理是什么?

2014-06-03 22:40 423 查看

举个例子:

就象你书的目录.

书的内容是数据

书的目录是索引

Oracle索引大致可分为B tree索引,Bitmap索引等索引

具体的索引可看看数据结构的书

这样说吧

索引是平衡树结构

比如你在数组查询中使用两分法查询比顺序查找快,就是这个道理

而不使用索引的表扫描就是顺序查找的

Re: 呵呵

It's very correct to say a B-Tree index is a balanced tree. But if you give an example of using a binary tree,

it would be helpful to point out that the "b" in binary has nothing to do with the "B" in B-Tree,

which means "Balanced" only.

By the way, how many books published in China have an index at the end now?

10 years ago I worked at a publishing company in China and felt strongly

we needed to encourage publishers to index all published books (maybe except dictionaries).

Yong Huang

最初由 biti_rainy 发布

这样说吧

索引是平衡树结构

比如你在数组查询中使用两分法查询比顺序查找快,就是这个道理

而不使用索引的表扫描就是顺序查找的


另外索引只检索索引列。再根据 rowid 取数据。

我的理解是如果不用索引,那么检索时就是全表搜索full scanner,若用索引

,就是在索引列的基于列的检索,可以大大降低了成本,



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: