ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [基础]索引

[基础]索引

原创 Linux操作系统 作者:fancyboy2k 时间:2009-12-10 09:34:09 0 删除 编辑
索引的评价因素:
1) 访问类型,如
records with a specified value in the attribute
or records with an attribute value falling in a specified range of values.
2)访问时间
3)插入时间
4)删除时间
5)空间开销

索引的类型:
1)有序索引
1.1.1)索引顺序组织
随着文件的增大,索引查找性能和顺序扫描性能都会下降,但是这种性能的下降可以通过对文件进行重新组织来弥补。
1.1.2)B+树组织
-Advantage:automatically reorganizes itself with small, local, changes, in the face of insertions and deletions.  Reorganization of entire file is not required to maintain performance.
-Disadvantage: extra insertion and deletion overhead, space overhead.
2)散列索引

Comparison of Ordered Indexing and Hashing
1) Cost of periodic re-organization
2)Relative frequency of insertions and deletions
3)Is it desirable to optimize average access time at the expense of worst-case access time?
4)Expected type of queries:
- Hashing is generally better at retrieving records having a specified value of the key.
-If range queries are common, ordered indices are to be preferred
通常设计者会使用有序索引,除非他预先知道将来不会频繁是有范围查询。

多码访问
1)使用多个单码访问
2)多码索引
3)位图索引

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/58054/viewspace-622086/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: allPM
下一篇: Passord Recovery Tools
请登录后发表评论 登录
全部评论

注册时间:2008-09-10

  • 博文量
    65
  • 访问量
    104675