,
Wim Van den Broeck
,
Guy Van den Broeck
,
Yisu Remy Wang
Creative Commons Attribution 4.0 International license
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 α-acyclic query by edits in linear time with amortized constant delay, which forms the basis of a cost-based optimizer for acyclic joins. Second, we show the Maximum Cardinality Search algorithm by Tarjan and Yannakakis constructs the unique shallowest join tree for any Berge-acyclic query, thus enabling parallel execution of large join queries. Finally, we prove that a simple algorithm by Hu et al. converts any connected left-deep linear plan of a γ-acyclic query into a join tree, allowing reuse of optimizers developed for binary joins.
@InProceedings{luo_et_al:LIPIcs.ICDT.2026.17,
author = {Luo, Zheng and Van den Broeck, Wim and Van den Broeck, Guy and Wang, Yisu Remy},
title = {{Algorithms for Optimizing Acyclic Queries}},
booktitle = {29th International Conference on Database Theory (ICDT 2026)},
pages = {17:1--17:18},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-413-0},
ISSN = {1868-8969},
year = {2026},
volume = {365},
editor = {ten Cate, Balder and Funk, Maurice},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ICDT.2026.17},
URN = {urn:nbn:de:0030-drops-256319},
doi = {10.4230/LIPIcs.ICDT.2026.17},
annote = {Keywords: Query Optimization, Join Trees, Enumeration}
}