arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1709.03685cs.DB
收藏

多项式时间中的最优动态索引选择

Optimal On The Fly Index Selection in Polynomial Time

Herbert Jordan, Bernhard Scholz, Pavle Subotić

摘要:

索引选择问题(ISP)是关系查询加速的一个重要问题,它作为一个组合背包问题在过去受到了很多关注。已经提供了针对这个非常困难的问题的各种解决方案。与现有文献相比,我们改变了问题定义的基本假设:我们将问题适应于在内存中存储关系的系统,并使用复杂的规约语言,例如,数据库。在我们的框架中,我们将复杂的查询分解为原始的搜索,选择元组的关系,其中一个平等谓词持有。原始搜索可以通过在原始搜索的输出结果的大小中表现出对数线性时间的最坏情况运行时复杂度的索引来加速。但是,与维护索引相关的开销在内存和计算时间方面非常昂贵。在这项工作中,我们提出了一个最佳的多项式时间算法,找到一个关系的索引的最小集合为一组给定的原始搜索。由于搜索谓词的代数性质,索引可以覆盖多个原语搜索,搜索谓词是关系属性上的等式的合取。索引搜索空间在关系中的属性数量方面表现出指数复杂性,因此在索引域中搜索解的蛮力算法是不可行的。作为设计多项式时间算法的脚手架,我们建立了一个偏序搜索操作,并使用Dilworth定理的建设性版本。我们展示了原始搜索链(形成偏序)和索引之间的密切关系。我们证明了我们的算法对于内存中数据记录编译器的有效性和效率,该编译器能够处理与内存中数十亿个条目的关系。

英文摘要:

The index selection problem (ISP) is an important problem for accelerating the execution of relational queries, and it has received a lot of attention as a combinatorial knapsack problem in the past. Various solutions to this very hard problem have been provided. In contrast to existing literature, we change the underlying assumptions of the problem definition: we adapt the problem for systems that store relations in memory, and use complex specification languages, e.g., Datalog. In our framework, we decompose complex queries into primitive searches that select tuples in a relation for which an equality predicate holds. A primitive search can be accelerated by an index exhibiting a worst-case run-time complexity of log-linear time in the size of the output result of the primitive search. However, the overheads associated with maintaining indexes are very costly in terms of memory and computing time. In this work, we present an optimal polynomial-time algorithm that finds the minimal set of indexes of a relation for a given set of primitive searches. An index may cover more than one primitive search due to the algebraic properties of the search predicate, which is a conjunction of equalities over the attributes of a relation. The index search space exhibits a exponential complexity in the number of attributes in a relation, and, hence brute-force algorithms searching for solutions in the index domain are infeasible. As a scaffolding for designing a polynomial-time algorithm, we build a partial order on search operations and use a constructive version of Dilworth's theorem. We show a strong relationship between chains of primitive searches (forming a partial order) and indexes. We demonstrate the effectiveness and efficiency of our algorithm for an in-memory Datalog compiler that is able to process relations with billions of entries in memory.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑