Froid: Optimization of imperative programs in a relational database

Karthik Ramachandra, Kwanghyun Park, K. Venkatesh Emani, Alan Halverson, Ce´sar Galindo-Legaria, Conor Cunningham

    Research output: Contribution to journalConference articlepeer-review

    Abstract

    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 nai¨ve 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.

    Original languageEnglish
    Pages (from-to)432-444
    Number of pages13
    JournalProceedings of the VLDB Endowment
    Volume11
    Issue number4
    DOIs
    Publication statusPublished - 2018
    Event44th International Conference on Very Large Data Bases, VLDB 2018 - Rio de Janeiro, Brazil
    Duration: 2018 Aug 272018 Aug 31

    Bibliographical note

    Publisher Copyright:
    © 2017 VLDB.

    All Science Journal Classification (ASJC) codes

    • Computer Science (miscellaneous)
    • Computer Science(all)

    Fingerprint

    Dive into the research topics of 'Froid: Optimization of imperative programs in a relational database'. Together they form a unique fingerprint.

    Cite this