Vectorization vs. compilation in query execution
Authors:
Open Access
- 13 June 2011
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 33-40
Abstract
Compiling database queries into executable (sub-) programs provides substantial benefits comparing to traditional interpreted execution. Many of these benefits, such as reduced interpretation overhead, better instruction code locality, and providing opportunities to use SIMD instructions, have previously been provided by redesigning query processors to use a vectorized execution model. In this paper, we try to shed light on the question of how state-of-the-art compilation strategies relate to vectorized execution for analytical database workloads on modern CPUs. For this purpose, we carefully investigate the behavior of vectorized and compiled strategies inside the Ingres VectorWise database system in three use cases: Project, Select and Hash Join. One of the findings is that compilation should always be combined with block-wise query execution. Another contribution is identifying three cases where "loop-compilation" strategies are inferior to vectorized execution. As such, a careful merging of these two strategies is proposed for optimal performance: either by incorporating vectorized execution principles into compiled query plans or using query compilation to create building blocks for vectorized processing.Keywords
This publication has 6 references indexed in Scilit:
- Generating code for holistic query evaluation2010
- DSM vs. NSM2008
- Compiled Query Execution Engine using JVM2006
- Conjunctive selection conditions in main memory2002
- Volcano-an extensible and parallel query evaluation systemIEEE Transactions on Knowledge and Data Engineering, 1994
- A history and evaluation of System RCommunications of the ACM, 1981