Lune

SIGMOD2020顶会

Functional-Style SQL UDFs With a Capital 'F'

Christian Duta, Torsten Grust

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Procedural Extensions of SQL: Understanding their usage in the wildSurabhi Gupta, Karthik RamachandraVLDB 2021 · 34 次引用
  2. Optimizing Nested Recursive QueriesAmir Shaikhha, Dan Suciu, Maximilian Schleich, Hung Q. NgoSIGMOD 2024 · 5 次引用
  3. MojoFrame: Dataframe Library in Mojo LanguageShengya Huang, Zhaoheng Li, Derek Werner, Yongjoo ParkICDE 2026

相关 Paper

  1. SQL Engines Excel at the Execution of Imperative ProgramsTim Fischer, Denis Hirn, Torsten GrustVLDB 2024 · 3 次引用
  2. One WITH RECURSIVE is Worth Many GOTOsDenis Hirn, Torsten GrustSIGMOD 2021 · 19 次引用
  3. The UDFBench Benchmark for General-purpose UDF QueriesYannis Foufoulas, Theoni Palaiologou, Alkis SimitsisVLDB 2025
  4. UDF to SQL translation through compositional lazy inductive synthesisGuoqiang Zhang, Yuanchao Xu, Xipeng Shen, Isil DilligOOPSLA 2021 · 14 次引用
  5. A Framework For Inferring Properties of User-Defined FunctionsXinyu Liu, Joy Arulraj, Alessandro OrsoICSE 2024
黄昏的海面,两侧是细线勾勒的悬崖