索引的评价因素:
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 Hashing1) 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/
,如需转载,请注明出处,否则将追究法律责任。