Home Knowledge Base Vectorized Database Execution

Vectorized Database Execution is the query processing strategy that operates on batches (vectors) of column values simultaneously using SIMD instructions and cache-friendly memory access patterns — replacing the traditional row-at-a-time "Volcano" iterator model with column-at-a-time batch processing that achieves 10-100x better throughput for analytical queries by maximizing CPU hardware utilization.

Traditional vs. Vectorized Execution

AspectRow-at-a-Time (Volcano)Vectorized (Column Batches)
Processing unit1 row per call1000+ values per call
Function call overhead1 per row per operator1 per batch per operator
CPU branch predictionPoor (type dispatch per row)Excellent (tight loop)
Cache utilizationPoor (wide rows evict cache)Excellent (column values contiguous)
SIMD utilizationNoneFull (AVX2/AVX-512)
Throughput~100 MB/s~10 GB/s

How Vectorized Execution Works

1. Columnar storage: Each column stored contiguously in memory. 2. Batch processing: Read 1024 values of a column into a vector. 3. Primitive operations: Apply operation to entire vector in a tight loop.

4. Selection vectors: Instead of copying filtered rows, use a selection vector (indices of qualifying rows). 5. Pipeline: Multiple operators process the same batch before moving to next batch → stays in L1/L2 cache.

SIMD in Practice

Systems Using Vectorized Execution

SystemApproachLanguage
DuckDBFull vectorized engineC++
ClickHouseVectorized column processingC++
Velox (Meta)Vectorized execution libraryC++
Apache Arrow DataFusionVectorized over Arrow columnarRust
SnowflakeVectorized cloud engineC++
MonetDBPioneered column-at-a-timeC

Vectorized vs. Compiled (Codegen)

Performance Impact

Vectorized execution is the dominant paradigm for modern analytical database engines — by aligning query processing with how modern CPUs actually work (wide SIMD units, deep caches, branch prediction), it extracts an order of magnitude more performance from the same hardware compared to traditional row-oriented processing.

vectorized querysimd databasecolumnar executionvectorized execution enginedatabase parallelism

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.