← Lessons

quiz vs the machine

Platinum1850

Databases

Vectorized Execution

Processing batches of rows per operator call to boost throughput.

5 min read · advanced · beat Platinum to climb

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.

Check yourself

Answer to earn rating on the learn ladder.

1. What does vectorized execution process per operator call?

2. What is a weakness of the row at a time volcano model?

3. Which storage layout pairs naturally with vectorization?