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

Yannakakis+:具有理论保证的实用无环查询评估

Yannakakis+: Practical Acyclic Query Evaluation with Theoretical Guarantees

Qichen Wang, Bingnan Chen, Binyang Dai, Ke Yi, Feifei Li, Liang Lin

AI总结:

提出Yannakakis+算法,通过生成标准DAG查询计划在保持理论保证的同时提升无环合取查询的实际效率,并成功集成至多种SQL引擎实现显著加速。

摘要:

无环合取查询构成了大多数分析工作负载的基础,在文献中从理论和实践两个角度得到了广泛研究。然而,理论与实践之间仍存在巨大鸿沟。尽管有40年历史的Yannakakis算法具有强大的理论运行时间保证,但由于其较高的隐藏常数因子,它并未在实际系统中被采用。在本文中,我们努力缩小这一差距,提出了Yannakakis+,即Yannakakis算法的改进版本,它在保持理论保证的同时更具实际效率。我们的实验表明,在广泛的查询和数据集上,Yannakakis+始终比原始Yannakakis算法快2倍到5倍。我们新算法的另一个优良特性是,它能生成由标准关系算子组成的传统DAG查询计划,使Yannakakis+能轻松插入任何标准SQL引擎。我们的系统原型目前支持四种不同的SQL引擎(DuckDB、PostgreSQL、SparkSQL和来自阿里云的AnalyticDB),实验表明,在测试的162个查询中,Yannakakis+在160个查询上的性能优于其原生查询计划,平均加速2.41倍,最大加速47,059倍。

英文摘要:

Acyclic conjunctive queries form the backbone of most analytical workloads, and have been extensively studied in the literature from both theoretical and practical angles. However, there is still a large divide between theory and practice. While the 40-year-old Yannakakis algorithm has strong theoretical running time guarantees, it has not been adopted in real systems due to its high hidden constant factor. In this paper, we strive to close this gap by proposing Yannakakis+, an improved version of the Yannakakis algorithm, which is more practically efficient while preserving its theoretical guarantees. Our experiments demonstrate that Yannakakis+ consistently outperforms the original Yannakakis algorithm by 2x to 5x across a wide range of queries and datasets. Another nice feature of our new algorithm is that it generates a traditional DAG query plan consisting of standard relational operators, allowing Yannakakis+ to be easily plugged into any standard SQL engine. Our system prototype currently supports four different SQL engines (DuckDB, PostgreSQL, SparkSQL, and AnalyticDB from Alibaba Cloud), and our experiments show that Yannakakis+ is able to deliver better performance than their native query plans on 160 out of the 162 queries tested, with an average speedup of 2.41x and a maximum speedup of 47,059x.

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

↑