Skip to content

Commit cb93e97

Browse files
authored
Merge pull request #5748 from Teggy/main
Add CIDR 2024 paper on UDF inlining/decorrelation
2 parents bf050f7 + 70a87e7 commit cb93e97

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

_science/2024-01-14-dear-udfs.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: post
3+
title: "Dear User-Defined Functions, Inlining isn't working out so great for us. Let's try batching to make our relationship work. Sincerely, SQL"
4+
author: "Kai Franz, Sam Arch, Denis Hirn, Torsten Grust, Todd C. Mowry, Andy Pavlo"
5+
thumb: "/images/science/thumbs/cidr-2024.svg"
6+
image: "/images/science/thumbs/cidr-2024.png"
7+
excerpt: ""
8+
tags: ["Paper"]
9+
---
10+
11+
[Paper (PDF)](https://www.cidrdb.org/cidr2024/papers/p13-franz.pdf)
12+
13+
Venue: CIDR 2024
14+
15+
## Abstract
16+
17+
SQL's user-defined functions (UDFs) allow developers to express complex
18+
computation using procedural logic. But UDFs have been the bane of database
19+
management systems (DBMSs) for decades because they inhibit optimization
20+
opportunities, potentially slowing down queries significantly. In
21+
response, batching and inlining techniques have been proposed to enable
22+
effective query optimization of UDF calls within SQL. Inlining is now
23+
available in a major commercial DBMS. But the trade-offs between both
24+
approaches on modern DBMSs remain unclear. We evaluate and compare UDF
25+
batching and inlining on enterprise and open-source DBMSs using a
26+
state-of-the-art UDF-centric workload. We observe the surprising result
27+
that although inlining is better on simple UDFs, batching outperforms
28+
inlining by up to 93.4× for more complex UDFs because it makes it easier
29+
for a DBMS’s query optimizer to decorrelate subqueries. We propose a
30+
hybrid approach that chooses batching or inlining to achieve the
31+
best performance.

0 commit comments

Comments
 (0)