结构引导的查询求值:迈向理论与实践的融合
Structure-Guided Query Evaluation: Towards Bridging the Gap from Theory to Practice
AI总结:
针对多关系连接查询优化难题,本文通过将SQL查询重写为Yannakakis算法的执行序列,提出结构引导的查询求值方法,证明考虑查询结构能显著提升现代DBMS在复杂场景下的性能。
摘要:
涉及多个关系的连接查询对当今的查询优化技术构成了严峻挑战。在某种程度上,这是因为这些技术对查询的结构特性关注不足。形成鲜明对比的是,数据库理论界已深入研究了查询的结构特性(如无环性和各种宽度概念),并通过Yannakakis算法的变体提出了高效的查询求值技术。然而,尽管实践中的大多数查询实际上是无环的或具有低宽度,但基于Yannakakis算法的结构引导查询求值技术尚未进入主流数据库技术领域。本工作的目标是解决这一理论与实践之间的差距,并证明在传统上具有挑战性的场景中,考虑查询结构能够显著提升现代DBMS的查询求值性能。具体而言,我们通过将SQL查询重写为表达Yannakakis算法执行过程的一系列SQL语句,研究了结构引导查询求值在三种架构不同的DBMS中的性能。此外,我们识别出一类特别适合我们方法的查询,允许在多种常见场景下进行查询应答而无需物化任何连接。通过实证评估,我们表明结构引导的查询求值能够使许多困难的连接查询的求值变得可行,而当前DBMS对其求值则需要耗费令人望而却步的时间和内存。
英文摘要:
Join queries involving many relations pose a severe challenge to today's query optimisation techniques. To some extent, this is due to the fact that these techniques do not pay sufficient attention to structural properties of the query. In stark contrast, the Database Theory community has intensively studied structural properties of queries (such as acyclicity and various notions of width) and proposed efficient query evaluation techniques through variants of Yannakakis' algorithm. However, although most queries in practice actually are acyclic or have low width, structure-guided query evaluation techniques based on Yannakakis' algorithm have not found their way into mainstream database technology yet. The goal of this work is to address this gap between theory and practice and to demonstrate that the consideration of query structure can improve query evaluation performance on modern DBMSs significantly in cases that have been traditionally challenging. In particular, we study the performance of structure-guided query evaluation in three architecturally distinct DBMSs by rewriting SQL queries into a sequence of SQL statements that express an execution of Yannakakis' algorithm. Moreover, we identify a class of queries that is particularly well suited for our approach and allows query answering in a variety of common scenarios without materializing any join. Through empirical evaluation we show that structure-guided query evaluation can make the evaluation of many difficult join queries feasible whereas their evaluation requires a prohibitive amount of time and memory on current DBMSs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。