Filter Representation in Vectorized Query Execution
Amadou Ngom, Prashanth Menon, Matthew Butrovich et al. · International Workshop on Data Management on New Hardware (DaMoN) · 2021
Advances in memory technology have made it feasible for database management systems (DBMS) to store their working data set in main memory. This trend shifts the bottleneck for query execution from disk accesses to CPU efficiency. One technique to improve CPU efficiency is batch-oriented processing, or vectorization, as it reduces interpretation overhead. For each vector (batch) of tuples, the DBMS must track the set of valid (visible) tuples that survive all previous processing steps. To that end, existing systems employ one of two data structures, or filter representations: selection vectors or bitmaps. In this work, we analyze each approach's strengths and weaknesses and offer recommendations on how to implement vectorized operations. Through a wide range of micro-benchmarks, we determine that the optimal strategy is a function of many factors: the cost of iterating through tuples, the cost of the operation itself, and how amenable it is to SIMD vectorization. Our analysis shows that bitmaps perform better for operations that can be vectorized using SIMD instructions and that selection vectors perform better on all other operations due to cheaper iteration logic.
Cited by 7 works. doi:10.1145/3465998.3466009 Open-access PDF
Authors
References
- Volcano-an extensible and parallel query evaluation system
- DB2 with BLU acceleration
- Vectorization vs. compilation in query execution
- Vectorwise: Beyond Column Stores
- Selection conditions in main memory
- Everything you always wanted to know about compiled and vectorized queries but were afraid to ask
- Relaxed operator fusion for in-memory databases
- Micro adaptivity in Vectorwise
- Faster set intersection with SIMD instructions by reducing branch mispredictions
- Mainlining databases