Building Advanced SQL Analytics From Low-Level Plan Operators

Thomas Neumann (Technical University of Munich)

Analytical queries virtually always involve aggregation and statistics. SQL offers a wide range of functionalities to summarize data such as associative aggregates, distinct aggregates, ordered-set aggregates, grouping sets, and window functions. In this work, we propose a unified framework for advanced statistics that composes all flavors of complex SQL aggregates from low-level plan operators. These operators can reuse materialized intermediate results, which decouples monolithic aggregation logic and speeds up complex multi-expression queries. The contribution is therefore twofold: our framework modularizes aggregate implementations, and outperforms traditional systems whenever multiple aggregates are combined. We integrated our approach into the high-performance database system Umbra and experimentally show that we compute complex aggregates faster than the state-of-the-art HyPer system.

Thomas Neumann is a full professor in the Department of Computer Science at the Technical University of Munich. His research interests are in the areas of database systems, query processing, and query optimization. In 2020, he received the Gottfried Wilhelm Leibniz Prize.