Optimizing Recursive Queries with Program Synthesis

02/21/2022
by   Yisu Remy Wang, et al.
0

Most work on query optimization has concentrated on loop-free queries. However, data science and machine learning workloads today typically involve recursive or iterative computation. In this work, we propose a novel framework for optimizing recursive queries using methods from program synthesis. In particular, we introduce a simple yet powerful optimization rule called the "FGH-rule" which aims to find a faster way to evaluate a recursive program. The solution is found by making use of powerful tools, such as a program synthesizer, an SMT-solver, and an equality saturation system. We demonstrate the strength of the optimization by showing that the FGH-rule can lead to speedups up to 4 orders of magnitude on three, already optimized Datalog systems.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/19/2021

Programming-By-Example by Programming-By-Example: Synthesis of Looping Programs

Program synthesis has seen many new applications in recent years, in lar...
research
07/05/2023

Runtime Repeated Recursion Unfolding: A Just-In-Time Online Program Optimization That Can Achieve Super-Linear Speedup

We introduce a just-in-time runtime program transformation based on repe...
research
07/13/2021

Bottom-up Synthesis of Recursive Functional Programs using Angelic Execution

We present a novel bottom-up method for the synthesis of functional recu...
research
09/11/2020

Repeated Recursion Unfolding for Super-Linear Speedup within Bounds

Repeated recursion unfolding is a new approach that repeatedly unfolds a...
research
12/24/2019

Aggressive Aggregation: a New Paradigm for Program Optimization

In this paper, we propose a new paradigm for program optimization which ...
research
05/30/2021

Convergence of Datalog over (Pre-) Semirings

Recursive queries have been traditionally studied in the framework of da...
research
11/10/2017

Optimised Maintenance of Datalog Materialisations

To efficiently answer queries, datalog systems often materialise all con...

Please sign up or login with your details

Forgot password? Click here to reset