Zone map (min-max index)
A zone map, or min-max index, is a lightweight index that stores the minimum and maximum value of a column for each block of data, letting queries skip blocks that can't match a filter.
Overview
A zone map (also called a block range index or min-max index) is one of the cheapest and most effective pruning techniques in analytical databases. For each contiguous block of rows, the database records the minimum and maximum value of a column within that block. When a query filters on that column, the engine checks each block's min-max range against the filter and skips any block whose range can't possibly contain a match — without reading the block's actual data at all.
How Zone Maps Work
Given a filter like WHERE order_date = '2024-06-01', a block whose recorded range is 2023-01-01 to 2023-12-31 can be skipped immediately, since the filter value falls entirely outside that range. Zone maps are cheap to build and store — just two values per block per column — and cheap to check, but they only help when data has some locality: the more a column is sorted or naturally clustered within blocks, the more values zone maps can prune.
Zone Maps vs. Traditional Indexes
Unlike a B-tree index, which points to exact row locations, a zone map only tells you whether a block might contain a match. It can't tell you which row within the block, so it's purely a pruning device that reduces I/O — the block still has to be scanned if it passes the min-max check.
DuckDB's Zone Maps
DuckDB automatically maintains a min-max index for every column of every general-purpose data type, for each row group, with no manual index creation required. Combined with predicate pushdown, this lets DuckDB skip entire row groups — whether stored natively or in Parquet files — that can't satisfy a query's WHERE clause. Because these zone maps are most effective on ordered data, loading data pre-sorted on frequently filtered columns can substantially improve how much a query can prune.
Related terms
A database index is a data structure that stores a subset of a table's data in an order optimized for fast lookups, letting queries find matching rows without scanning the whole table.
MAP type →MAP is a nested SQL data type storing an ordered collection of unique key-value pairs, useful for representing dynamic or sparse attributes within a single column.
Columnar storage →Columnar storage is a data layout that groups values from the same column together on disk, rather than storing complete rows contiguously, which speeds up analytical scans and compression.
Bloom filter →A Bloom filter is a space-efficient probabilistic data structure used to test whether a value might be in a set, with no false negatives but a small, tunable rate of false positives.
row group →A row group is a fundamental storage concept in columnar databases like DuckDB that represents a horizontal partition of data containing a fixed number of…
Predicate pushdown →Predicate pushdown is a query optimization that moves filter conditions as close as possible to the data source, so fewer rows (or bytes) are read before filtering happens.
FAQS
A regular index like a B-tree points to specific rows. A zone map only stores the min and max value per block, so it can prove a block has no match and skip it, but it can't point to individual rows within a block that does match.
No. DuckDB automatically maintains a min-max zone map for every column in every row group without any manual index creation.
