vix.ing · top · new · best · stats · spec

Compiling PL/SQL Away

2019/09/07 by Christian Duta, Duta, Christian, Denis Hirn +3 · 1 voice
Computer Science · #Advanced Database Systems and Queries #Databases (cs.DB) #FOS: Computer and information sciences #Logic, programming, and type systems #Parallel Computing and Optimization Techniques #Programming Languages (cs.PL) #cs.DB #cs.PL

paper · pdf · doi:10.48550/arxiv.1909.03291

openalex publication_date 2019/09/07 · arxiv published 2019/09/07 · arxiv updated 2019/09/07 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

"PL/SQL functions are slow," is common developer wisdom that derives from the tension between set-oriented SQL evaluation and statement-by-statement PL/SQL interpretation. We pursue the radical approach of compiling PL/SQL away, turning interpreted functions into regular subqueries that can then be efficiently evaluated together with their embracing SQL query, avoiding any PL/SQL to SQL context switches. Input PL/SQL functions may exhibit arbitrary control flow. Iteration, in particular, is compiled into SQL-level recursion. RDBMSs across the board reward this compilation effort with significant run time savings that render established developer lore questionable.

Citations

Discussions

Related