Hasty Briefsbeta

Bilingual

New Compilation Methods for Complex User-Defined Functions

9 months ago
  • #SQL
  • #database
  • #performance
  • User-defined functions (UDFs) often have poor performance, limiting their use in performance-critical applications.
  • This thesis leverages programming language techniques to improve UDF performance by compiling them to pure SQL queries.
  • For iterative UDFs, a novel trampolined-style compilation approach eliminates the impedance mismatch between PL/SQL and SQL, improving performance by up to 3 times.
  • The approach allows the entire computation to be expressed in SQL, enabling optimization and execution on any system supporting contemporary SQL.
  • For recursive UDFs, compilation to pure SQL queries eliminates overhead, improving performance by up to 180 times.
  • The thesis demonstrates that SQL is expressive enough for complex computations and achieves excellent performance.
  • Detailed rules are provided for implementing a UDF compiler in any database system supporting LATERAL joins and recursive CTEs.