Learned Graph Rewriting with Equality Saturation: A New Paradigm in Relational Query Rewrite and Beyond

George-Octavian Bărbulescu, Taiyi Wang, Zak Singh, Eiko Yoneki
6/19/2024
cs.DBcs.LG

No confident code implementation found for this paper.

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 equality saturation solvers, while also achieving competitive results against mainstream query optimisers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{brbulescu2024learned,
  title  = {Learned Graph Rewriting with Equality Saturation: A New Paradigm in Relational Query Rewrite and Beyond},
  author = {George-Octavian Bărbulescu and Taiyi Wang and Zak Singh and Eiko Yoneki},
  year   = {2024},
  eprint = {2407.12794},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.12794v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.12794.svg)](https://codeofpaper.com/paper/2407.12794)

Discussion