Algorithms for Optimizing Acyclic Queries

📅 2025-09-17
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the problem of constructing optimal join trees for acyclic queries to improve query execution efficiency and optimizer compatibility. We propose three principled construction methods tailored to α-acyclic, β-acyclic (Berge-acyclic), and γ-acyclic queries: (i) the first constant-delay enumeration algorithm for join trees of α-acyclic queries; (ii) a proof that Maximum Cardinality Search yields the shallowest join tree for β-acyclic queries; and (iii) a characterization showing that left-deep linear plans for γ-acyclic queries are equivalent to join trees. All methods integrate seamlessly with mainstream binary-join optimization frameworks, supporting cost-based optimization and parallel execution. Experiments demonstrate substantial performance gains for large-scale acyclic queries, while reusing existing optimizer infrastructure. The framework thus bridges theoretical rigor—grounded in hypergraph acyclicity—with practical engineering impact.

Technology Category

Application Category

📝 Abstract
Most research on query optimization has centered on binary join algorithms like hash join and sort-merge join. However, recent years have seen growing interest in theoretically optimal algorithms, notably Yannakakis' algorithm. These algorithms rely on join trees, which differ from the operator trees for binary joins and require new optimization techniques. We propose three approaches to constructing join trees for acyclic queries. First, we give an algorithm to enumerate all join trees of an alpha-acyclic query by edits with amortized constant delay, which forms the basis of a cost-based optimizer for acyclic joins. Second, we show that the Maximum Cardinality Search algorithm by Tarjan and Yannakakis constructs a unique shallowest join tree, rooted at any relation, for a Berge-acyclic query; this tree enables parallel execution of large join queries. Finally, we prove that any connected left-deep linear plan for a gamma-acyclic query can be converted into a join tree by a simple algorithm, allowing reuse of optimization infrastructure developed for binary joins.
Problem

Research questions and friction points this paper is trying to address.

Enumerating all join trees for alpha-acyclic queries efficiently
Constructing shallowest join trees for Berge-acyclic queries
Converting left-deep linear plans to join trees for gamma-acyclic queries
Innovation

Methods, ideas, or system contributions that make the work stand out.

Enumerate all join trees with constant delay
Construct shallowest join tree for parallel execution
Convert linear plans to join trees simply
🔎 Similar Papers
No similar papers found.