Window Function Expression: Let the Self-join Enter
Radim Baca
摘要
Window function expressions (WFEs) became part of the SQL:2003 standard, and since then, they have often been implemented in database systems (DBS). They are especially essential to OLAP DBSs, and people use them daily. Even though WFEs are a heavily used part of the SQL language, the amount of research done on their optimization in the last two decades is not significant. WFE does not extend the expressive power of the SQL language, but it makes writing SQL queries easier and more transparent. DBSs always compile SQL queries with WFE using a sequence of partition-sort-compute operators, which we call a linear strategy. Plans resulting from the linear strategy are robust and, in many cases, efficient. This article introduces an alternative strategy using a self-join, which is not considered in the current DBSs. We call it the self-join strategy, and it is based on an SQL query transformation where the result query uses a self-join query plan to compute WFE. One output of this work is a tool that can automatically perform such SQL query transformations. We created a microbenchmark showing that the self-join strategy is more effective than the linear strategy in many cases. We also performed a cost-based experiment to evaluate the query optimizers' ability to select an appropriate strategy. The article's main aim is to show that usage of the self-join strategy for queries with WFE is beneficial if selected in a cost-based manner.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper1
问问它们各自怎么用它它引用的顶会 Paper2
- Quantifying TPC-H Choke Points and Their OptimizationsMarkus Dreseler, Martin Boissier, Tilmann Rabl, Matthias UflackerVLDB 2020 · 被引用 91 次
- Efficient Evaluation of Arbitrarily-Framed Holistic SQL Aggregates and Window FunctionsAdrian Vogelsgesang, Thomas Neumann, Viktor Leis, Alfons KemperSIGMOD 2022
相关 Paper
- Functional-Style SQL UDFs With a Capital 'F'Christian Duta, Torsten GrustSIGMOD 2020 · 被引用 11 次
- Towards Exploratory Query Optimization for Template-Based SQL WorkloadsJieming Feng, Zhanhuai Li, Qun ChenICDE 2024 · 被引用 4 次
- Unraveling the Impact of Window Semantics: Optimizing Join Order for Efficient Stream ProcessingAriane Ziehn, Jan Szlang, Steffen Zeuch, Volker MarklVLDB 2025 · 被引用 2 次
- LEAP: A Low-cost Spark SQL Query Optimizer using Pairwise ComparisonJunhao Ye, Jiahui Li, Lu Chen, Yuren Mao 等VLDB 2025 · 被引用 2 次
- Query Weak Equivalence and its Verification in Analytical DatabasesJinguo You, Wanting Fu, Yuxuan Wang, Peilei He 等ICDE 2025 · 被引用 1 次
