Affiliation:
1. EPFL, Lausanne, Lausanne, Switzerland
Abstract
Abstraction without regret refers to the vision of using high-level programming languages for systems development without experiencing a negative impact on performance. A database system designed according to this vision offers both increased productivity and high performance instead of sacrificing the former for the latter as is the case with existing, monolithic implementations that are hard to maintain and extend.
In this article, we realize this vision in the domain of analytical query processing. We present LegoBase, a query engine written in the
high-level
programming language Scala. The key technique to regain efficiency is to apply
generative
programming: LegoBase performs source-to-source compilation and optimizes database systems code by converting the high-level Scala code to specialized, low-level C code. We show how generative programming allows to
easily
implement a wide spectrum of optimizations, such as introducing data partitioning or switching from a row to a column data layout, which are difficult to achieve with existing low-level query compilers that handle
only
queries. We demonstrate that sufficiently powerful abstractions are essential for dealing with the complexity of the optimization effort, shielding developers from compiler internals and decoupling individual optimizations from each other.
We evaluate our approach with the TPC-H benchmark and show that (a) with all optimizations enabled, our architecture significantly outperforms a commercial in-memory database as well as an existing query compiler. (b) Programmers need to provide just a few hundred lines of high-level code for implementing the optimizations, instead of complicated low-level code that is required by existing query compilation approaches. (c) These optimizations may potentially come at the cost of using more system memory for improved performance. (d) The compilation overhead is low compared to the overall execution time, thus making our approach usable in practice for compiling query engines.
Funder
Google Ph.D. Fellowship, NCCR MARVEL, and ERC
Publisher
Association for Computing Machinery (ACM)
Reference94 articles.
1. Column-stores vs. row-stores
2. DBToaster
3. Alfred V. Aho Ravi Sethi and Jeffrey D. Ullman. 2007. Compilers: Principles Techniques and Tools. Vol. 2. Addison-Wesley Reading MA. Alfred V. Aho Ravi Sethi and Jeffrey D. Ullman. 2007. Compilers: Principles Techniques and Tools. Vol. 2. Addison-Wesley Reading MA.
Cited by
27 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献