arXiv · 1909.03291
Compiling PL/SQL Away
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.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Christian Duta, Denis Hirn, Torsten Grust. 2019-09-07. Compiling PL/SQL Away. https://arxiv.org/abs/1909.03291
Cite the original work for its findings. Save a collection to share your selection of sources.