UDF Compilation
“Move your computation close to the data” is an age-old mantra for developing efficient database-driven applications. However, following this advice requires a very intimate knowledge of the database query language at hand. In this branch of our research, we use techniques developed in other areas of computer science, such as programming languages, to enable you to write complex in-database computation without having to read the SQL standard from cover to cover.
Publications
SQL Engines Excel at the Execution of Imperative Programs
Tim Fischer • Denis Hirn • Torsten Grust
VLDB 2025, 51th International Conference on Very Large Data Bases (VLDB 2025), September 1, 2025, London, United Kingdom (to be published)
Dear User-Defined Functions, Inlining isn't working out so great for us. Let's try batching to make our relationship work. Sincerely, SQL
Kai Franz ☠ • Sam Arch ☠ • Denis Hirn • Torsten Grust • Todd C. Mowry ☠ • Andy Pavlo ☠
(☠ Carnegie Mellon University)
Proceedings of the 14th Conference on Innovative Data Systems Research (CIDR 2024), Chaminade, CA, USA, January 2024.
Data is Data and Control Should be Data, Too—Compiling Iterative Table-valued PL/SQL UDFs into Recursive SQL Code
VLDB 2023 PhD Workshop, co-located with the 49th International Conference on Very Large Data Bases (VLDB 2023), August 28, 2023, Vancouver, Canada
To Iterate Is Human, to Recurse Is Divine—Mapping Iterative Python to Recursive SQL
Datenbanksysteme für Business, Technologie und Web (BTW 2023), Student Program, Dresden, Germany, March 2023. Best Student Contribution doi:10.18420/BTW2023-73
BibTeX Citation
@incollection{10.18420/BTW2023-73,
author = {Fischer, Tim},
title = {To Iterate Is Human, to Recurse Is Divine --- Mapping Iterative Python to Recursive SQL},
year = {2023},
doi = {10.18420/BTW2023-73},
booktitle = {BTW 2023},
publisher = {Gesellschaft für Informatik e.V.},
address = {Bonn},
isbn = {978-3-88579-725-8},
pages = {1069--1074}
}
Snakes on a Plan — Compiling Python Functions into Plain SQL Queries
Denis Hirn • Torsten Grust • Tim Fischer
Proceedings of the 41st ACM SIGMOD Int’l Conference on Management of Data (SIGMOD 2022), Philadelphia, PA, USA, June 2022. doi:10.1145/3514221.3520175
BibTeX Citation
@inproceedings{snakes-on-a-plan,
author = {Fischer, Tim and Hirn, Denis and Grust, Torsten},
title = {Snakes on a Plan: Compiling Python Functions into Plain SQL Queries},
year = {2022},
isbn = {9781450392495},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3514221.3520175},
doi = {10.1145/3514221.3520175},
booktitle = {Proceedings of the 2022 International Conference on Management of Data},
pages = {2389–2392},
numpages = {4},
keywords = {SQL, compilation, python, recursion, user-defined functions},
location = {Philadelphia, PA, USA},
series = {SIGMOD '22}
}
One WITH RECURSIVE Is Worth Many GOTOs
Proceedings of the 40th ACM SIGMOD Int’l Conference on Management of Data (SIGMOD 2021), Xi’an, Shaanxi, China, June 2021.
PL/SQL Without the PL
Proceedings of the 39th ACM SIGMOD Int’l Conference on Management of Data (SIGMOD 2020), Portland, Oregon, USA, June 2020.
Compiling PL/SQL Away
Denis Hirn • Torsten Grust • Christian Duta
Proceedings of the 10th Conference on Innovative Data Systems Research (CIDR 2020), Amsterdam, The Netherlands, January 2020.
PgCuckoo — Laying Plan Eggs Into PostgreSQL's Nest
Proceedings of the 38th ACM SIGMOD Int’l Conference on the Management of Data (SIGMOD 2019), Amsterdam, The Netherlands, June 2019.