Learned Graph Rewriting with Equality Saturation: A New Paradigm in Relational Query Rewrite and Beyond
George-Octavian B\u{a}rbulescu, Taiyi Wang, Zak Singh, Eiko Yoneki

TL;DR
This paper introduces Aurora, a novel system combining equality saturation with graph reinforcement learning to efficiently rewrite relational queries, significantly speeding up SQL plan generation while maintaining competitive quality.
Contribution
Aurora is the first system to integrate equality saturation with graph reinforcement learning for relational query rewriting, enabling faster and effective plan optimization.
Findings
SQL plans generated by Aurora are orders of magnitude faster.
Aurora achieves competitive plan quality compared to mainstream optimizers.
The approach effectively guides non-destructive graph rewriting using RL.
Abstract
Query rewrite systems perform graph substitutions using rewrite rules to generate optimal SQL query plans. Rewriting logical and physical relational query plans is proven to be an NP-hard sequential decision-making problem with a search space exponential in the number of rewrite rules. In this paper, we address the query rewrite problem by interleaving Equality Saturation and Graph Reinforcement Learning (RL). The proposed system, Aurora, rewrites relational queries by guiding Equality Saturation, a method from compiler literature to perform non-destructive graph rewriting, with a novel RL agent that embeds both the spatial structure of the query graph as well as the temporal dimension associated with the sequential construction of query plans. Our results show Graph Reinforcement Learning for non-destructive graph rewriting yields SQL plans orders of magnitude faster than existing…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSemantic Web and Ontologies · Data Mining Algorithms and Applications · Advanced Database Systems and Queries
