---
title: "Vectorized execution"
description: "Vectorized execution is a query processing model where each operator processes a batch (a \"vector\") of values at once, instead of one row at a time, to reduce interpretation overhead and better use modern CPUs."
canonical: "https://motherduck.com/glossary/vectorized-execution/"
related:
  - title: "DuckLake Architecture Deep Dive"
    url: "https://motherduck.com/blog/ducklake-architecture-deep-dive/"
  - title: "Vector Technologies for AI: Extending Your Existing Data Stack"
    url: "https://motherduck.com/blog/vector-technologies-ai-data-stack/"
  - title: "Optimizing query performance | MotherDuck Docs"
    url: "https://motherduck.com/docs/key-tasks/query-performance/"
gated_asset:
  title: "DuckLake on MotherDuck"
  url: "https://motherduck.com/product/ducklake/"
---

# Vectorized execution

> Vectorized execution is a query processing model where each operator processes a batch (a "vector") of values at once, instead of one row at a time, to reduce interpretation overhead and better use modern CPUs.

## Overview

Traditional query engines built on the "Volcano" or iterator model process one row at a time: each operator's `next()` call produces a single tuple, and the overhead of function calls and branching is paid once per row. Vectorized execution instead has each operator process a whole batch of rows — a vector — per call, amortizing that per-call overhead across hundreds or thousands of values and letting the CPU execute tight, predictable loops that benefit from SIMD instructions and cache locality.

<glossary-callout guide="ai-analytics-eval-field-guide" />

## Vectorized vs. Tuple-at-a-Time

The performance gap between the two models is large for analytical queries. A tuple-at-a-time engine spends much of its time on interpretation overhead unrelated to the actual computation; a vectorized engine spends most of its time doing real work — filtering, aggregating, hashing — on tightly packed arrays of values. This is why essentially every modern analytical database engine (DuckDB, ClickHouse, Snowflake, and others) uses vectorized execution rather than row-at-a-time processing.

## DuckDB's Vectorized Engine

DuckDB processes data in vectors of up to `STANDARD_VECTOR_SIZE` (2048) values by default, passed between operators as columnar batches rather than individual rows. Vectorized execution is paired with **morsel-driven parallelism**, an approach from the HyPer research system: work is split into small units ("morsels") that idle threads pull from a shared queue, giving natural load balancing across CPU cores without a fixed, upfront work partitioning. Together, columnar storage, vectorized execution, and morsel-driven parallelism are the three pillars that make DuckDB fast on a single machine.
