Optimization of Imperative Programs in a Relational Database

12/01/2017
by   Karthik Ramachandra, et al.
0

For decades, RDBMSs have supported declarative SQL as well as imperative functions and procedures as ways for users to express data processing tasks. While the evaluation of declarative SQL has received a lot of attention resulting in highly sophisticated techniques, the evaluation of imperative programs has remained naive and highly inefficient. Imperative programs offer several benefits over SQL and hence are often preferred and widely used. But unfortunately, their abysmal performance discourages, and even prohibits their use in many situations. We address this important problem that has hitherto received little attention. We present Froid, an extensible framework for optimizing imperative programs in relational databases. Froid's novel approach automatically transforms entire User Defined Functions (UDFs) into relational algebraic expressions, and embeds them into the calling SQL query. This form is now amenable to cost-based optimization and results in efficient, set-oriented, parallel plans as opposed to inefficient, iterative, serial execution of UDFs. Froid's approach additionally brings the benefits of many compiler optimizations to UDFs with no additional implementation effort. We describe the design of Froid and present our experimental evaluation that demonstrates performance improvements of up to multiple orders of magnitude on real workloads.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/11/2020

Optimizing Cursor Loops in Relational Databases

Loops that iterate over SQL query results are quite common, both in appl...
research
04/17/2018

Heuristic and Cost-based Optimization for Diverse Provenance Tasks

A well-established technique for capturing database provenance as annota...
research
03/23/2017

Flare: Native Compilation for Heterogeneous Workloads in Apache Spark

The need for modern data analytics to combine relational, procedural, an...
research
02/23/2023

A Scalable Space-efficient In-database Interpretability Framework for Embedding-based Semantic SQL Queries

AI-Powered database (AI-DB) is a novel relational database system that u...
research
07/25/2018

Compiling Database Application Programs

There is a trend towards increased specialization of data management sof...
research
06/26/2015

Bag-of-Features Image Indexing and Classification in Microsoft SQL Server Relational Database

This paper presents a novel relational database architecture aimed to vi...
research
08/31/2020

SparkGOR: A unified framework for genomic data analysis

Motivation: Our goal was to combine the capabilities of Spark and GOR in...

Please sign up or login with your details

Forgot password? Click here to reset