Lune

SIGMOD2020Top-tier venue

Functional-Style SQL UDFs With a Capital 'F'

Christian Duta, Torsten Grust

2020Year
11Citations
3Top-tier citations

Abstract

We advocate to express complex in-database computation using a functional style in which SQL UDFs use plain self-invocation to recurse. The resulting UDFs are concise and readable, but their run time performance on contemporary RDBMSs is sobering. This paper describes how to compile such functional-style UDFs into SQL:1999 recursive common table expressions. We build on function call graphs to build the compiler's core and to realize a series of optimizations (reference counting, memoization, exploitation of linear and tail recursion). The compiled UDFs evaluate efficiently, challenging the performance of manually tweaked (but often convoluted) SQL code. SQL UDFs can indeed be functional and fast.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 5a415884-be38-4cc4-9a7a-d3b04c9863fc

Cited by top-tier papers3

Ask how each one uses it

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines