计算机科学与探索 ›› 2015, Vol. 9 ›› Issue (2): 182-192.DOI: 10.3778/j.issn.1673-9418.1406007

• 数据库技术 • 上一篇    下一篇

可持久化CSB+-树索引技术研究

王  胜+,秦小麟,沈  尧,李博涵,史文浩   

  1. 南京航空航天大学 计算机科学与技术学院,南京 210016
  • 出版日期:2015-02-01 发布日期:2015-02-03

Research on Durable CSB+-Tree Indexing Technology

WANG Sheng+, QIN Xiaolin, SHEN Yao, LI Bohan, SHI Wenhao   

  1. College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China
  • Online:2015-02-01 Published:2015-02-03

摘要: 现有主存索引方案为实现重用功能仅将更新操作存储到硬盘中,根据操作序列进行索引恢复,实时性和重用性均较差。为进一步提升重用性和实时性,提出了一种可持久化的CSB+-树(cache sensitive B+-tree)索引方案。该方案基于内存映射技术,完整而高效地将索引结构保存到外存中,导入时无需重复创建索引,可节省大量计算资源。针对索引更新过程中出现大量内存碎片问题,采用一种分类内存管理机制进行管理和监视,当内存碎片过多而无法利用时,基于有序键值对进行索引重构以完全消除内存碎片。实验结果表明,所提方案与现有方案相比具有更好的实时性和重用性,同时具有高效的查询处理能力。

关键词: 主存索引, 持久化, CSB+-树, 内存映射, 索引头

Abstract: To achieve the function of reusing, existing main-memory indexing schemes only store the update operation to the disk and recover the index according to the operating sequence, and are less reusable and real-time. To improve the reusability and efficiency further, this paper proposes a durable CSB+-tree (cache sensitive B+-tree) indexing scheme based on memory mapping technology, which stores the index structure into the disk completely and efficiently, and doesn’t need to build the index when loaded. For the problem of memory fragmentation during updating the index, this paper uses a classified memory managing scheme to monitor, and employs a rebuilding mechanism based on the sorted key-value pairs to wipe out the fragmentation when it is too much to reuse. The experimental results show that compared with the existing schemes, the proposed scheme is more real-time and reusable, with efficient querying performance.

Key words: main-memory index, durable, CSB+-tree, memory map, index head