,
Dan Suciu
,
Yisu Remy Wang
,
Max Willsey
Creative Commons Attribution 4.0 International license
Recent work in programming languages developed an approach to term rewritings based on equality saturation (EqSat), which, instead of applying destructively the rewrite rules, maintains all equivalent expressions in a structure called an E-graph. This paper describes two surprising connections between EqSat and databases, going both ways. On one hand equality saturation can be viewed as a query evaluation problem, with great benefits. On the other hand, most sophisticated SQL query optimizers are based on the Volcano/Cascades framework which, we explain, is a variant of EqSat.
@InProceedings{zhang_et_al:LIPIcs.ICDT.2025.34,
author = {Zhang, Yihong and Suciu, Dan and Wang, Yisu Remy and Willsey, Max},
title = {{Database Theory in Action: Search-Based Program Optimization}},
booktitle = {28th International Conference on Database Theory (ICDT 2025)},
pages = {34:1--34:6},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-364-5},
ISSN = {1868-8969},
year = {2025},
volume = {328},
editor = {Roy, Sudeepa and Kara, Ahmet},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ICDT.2025.34},
URN = {urn:nbn:de:0030-drops-229759},
doi = {10.4230/LIPIcs.ICDT.2025.34},
annote = {Keywords: Query optimization, program optimization, Cascades framework, equality saturation, Datalog}
}