Vectorized Execution
Vectorized execution processes data in batches of many values at once instead of one row at a time. It cuts per row overhead and lets the CPU run tight efficient loops.
The problem with row at a time
The classic volcano model pulls one row through a chain of operators, calling a next function per row. Each call has overhead, and branchy single row code uses the CPU poorly. For analytic scans over millions of rows this overhead dominates.
How vectorization helps
A vectorized engine passes a column batch, often a thousand values, through each operator in one call. A filter applies its condition across the whole batch in a tight loop. This improves cache locality, reduces function call overhead, and exposes work to CPU level parallelism.
- Operators handle batches, not single rows.
- Tight loops improve cache and CPU efficiency.
- It pairs naturally with columnar storage.
Key idea
Vectorized execution runs operators over column batches in tight loops, slashing per row overhead and using the CPU far better than row at a time processing.