Paper notes - Efficiently Compiling Efficient Query Plans for Modern Hardware
(personal summary based on the paper) A common approach to executing queries in database systems is the classical iterator model introduced in the Volcano paper. This model is simple and flexible, and operates by having each plan node implement a next() method that returns one tuple at a time when called repeatedly. However, this model incurs performance overhead due to the large number of virtual function calls (next()), which often rely on function pointers or interface dispatching. These calls can become expensive when executed millions of times. To address this, some systems reduce the overhead by passing batches of tuples instead of single tuples between operators, enabling vectorized execution and reducing call frequency. The paper introduces a query compilation technique that translates SQL queries into efficient machine code using the LLVM compiler framework. Instead of pulling tuples via next() calls, the execution model pushes data from producers to consumers. This a...