SQL Engines Excel at the Execution of Imperative Programs

SQL query engines can act as efficient runtime environments for the execution of imperative programs over database-resident tabular data. To make this point, we lay out the details of a compilation strategy that maps the basic blocks of arbitrarily branching and looping control flow graphs into plain---possibly recursive---SQL:1999 common table expressions. The compiler does not stumble when faced with imperative programs of several hundred lines and emits SQL code that can execute such programs over entire batches of input arguments. These batches create opportunities for parallel program evaluation which contemporary query decorrelation techniques exploit automatically. SQL engines that already support UDFs may find the present program execution approach to outperform their native implementation---SQL engines without such support may gain UDF capabilities without the need to build a dedicated interpreter.

Authors

Institutions

Publication Details

Journal
Proceedings of the VLDB Endowment
Published
2024-09-01
DOI
https://doi.org/10.14778/3704965.3704976
Citations
3
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
1.47
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

SQL Engines Excel at the Execution of Imperative Programs

Tim Fischer, Denis Hirn, Torsten Grust
3 citations
Proceedings of the VLDB Endowment
Parallel Computing and Optimization Techniques
1.47
article

SQL Engines Excel at the Execution of Imperative Programs

Tim Fischer, Denis Hirn, Torsten Grust
article en
3 citations

Abstract

SQL query engines can act as efficient runtime environments for the execution of imperative programs over database-resident tabular data. To make this point, we lay out the details of a compilation strategy that maps the basic blocks of arbitrarily branching and looping control flow graphs into plain---possibly recursive---SQL:1999 common table expressions. The compiler does not stumble when faced with imperative programs of several hundred lines and emits SQL code that can execute such programs over entire batches of input arguments. These batches create opportunities for parallel program evaluation which contemporary query decorrelation techniques exploit automatically. SQL engines that already support UDFs may find the present program execution approach to outperform their native implementation---SQL engines without such support may gain UDF capabilities without the need to build a dedicated interpreter.

Proceedings of the VLDB EndowmentVol. 17(13)
University of Tübingen (DE)
Openalex Percentile: Top 15%
Parallel Computing and Optimization Techniques
1.47
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.