针对现有的多核并行自适应索引算法不能高效地利用多核处理器的并行资源,且不能较好处理顺序查询的问题,提出了一种改进的多核并行自适应索引算法.该算法在优化现有Refined Partition Merge算法的基础上,将加锁并行方法与Refined Partition Merge算法相结合,在索引中数据块较少时,使用优化的Refined Partition Merge算法,降低线程之间冲突的概率,减少线程等待时间,提高线程利用率.当索引中数据块较多时,使用加锁并行方法,充分利用了多核处理器的并行资源.除此之外,还提出了一种提升自适应索引鲁棒性的优化方法,使多核并行自适应索引算法能够适应两种常用查询样式.实验结果表明,该算法使多核并行自适应索引在查询时间上明显降低,使查询速度提升25.7%~33.2%,并且能够适应多种常用查询样式.
An improved parallel adaptive indexing algorithm on multi-core CPUs is proposed to solve the problems that the parallel adaptive indexing algorithms cannot take full advantage of the CMP's parallel execution resource, and properly process the sequential query pattern. Based on the optimization of the Refined Partition Merge algorithm, our improved parallel adaptive indexing algorithm combines the Parallel Database Cracking method with the Refined Partition Merge algorithm. In our algorithm, when fewer data chunks are in the index, we use the optimized Refined Partition Merge algorithm so as to reduce the probability of conflict between threads, decrease the waiting time, and increase the utilization of the threads, and when more data chunks are in the index, we use the Parallel Database Cracking method so as to take full advantage of the CMP's parallel execution resources. Besides, we propose an optimization for the robustness, which makes our algorithm suitable for two common query patterns. Experiments show that our method can reduce the query time by 25.7%-33.2%, and suit with common query patterns.