Tidy Tuples and Flying Start: fast compilation and fast execution of relational queries in Umbra
Open Access
- 2 June 2021
- journal article
- research article
- Published by Springer Nature in The VLDB Journal
- Vol. 30 (5) , 883-905
Abstract
Although compiling queries to efficient machine code has become a common approach for query execution, a number of newly created database system projects still refrain from using compilation. It is sometimes claimed that the intricacies of code generation make compilation-based engines too complex. Also, a major barrier for adoption, especially for interactive ad hoc queries, is long compilation time. In this paper, we examine all stages of compiling query execution engines and show how to reduce compilation overhead. We incorporate the lessons learned from a decade of generating code in HyPer into a design that manages complexity and yields high speed. First, we introduce a code generation framework that establishes abstractions to manage complexity, yet generates code in a single fast pass. Second, we present a program representation whose data structures are tuned to support fast code generation and compilation. Third, we introduce a new compiler backend that is optimized for minimal compile time, and simultaneously, yields superior execution performance to competing approaches, e.g., Volcano-style or bytecode interpretation. We implemented these optimizations in our database system Umbra to show that it is possible to unite fast compilation and fast execution. Indeed, Umbra achieves unprecedentedly low query latencies. On small data sets, it is even faster than interpreter engines like DuckDB and PostgreSQL. At the same time, on large data sets, its throughput is on par with the state-of-the-art compiling system HyPer.Keywords
Funding Information
- H2020 European Research Council (725286)
This publication has 22 references indexed in Scilit:
- Amazon Redshift and the Case for Simpler Data Warehouses2015
- Morsel-driven parallelism2014
- DBToaster: higher-order delta processing for dynamic, frequently fresh viewsThe VLDB Journal, 2014
- Micro-Specialization in DBMSes2012
- Micro-specialization2012
- Efficiently compiling efficient query plans for modern hardwareProceedings of the VLDB Endowment, 2011
- Breaking the memory wall in MonetDBCommunications of the ACM, 2008
- Linear scan register allocationACM Transactions on Programming Languages and Systems, 1999
- tccACM SIGPLAN Notices, 1997
- Global code motion/global value numberingACM SIGPLAN Notices, 1995