SQL
Index Types
DuckDB has two built-in index types. Indexes can also be defined via [extensions](#docs:extensions:overview).  
#### Min-Max Index (Zonemap) {#docs:sql:indexes::min-max-index-zonemap}  
A [min-max index](https://en.wikipedia.org/wiki/Block_Range_Index) (also known as zonemap and block range index) is automatically created for columns of all [general-purpose data types](#docs:sql:data_types:overview).  
#### Adaptive Radix Tree (ART) {#docs:sql:indexes::adaptive-radix-tree-art}  
An [Adaptive Radix Tree (ART)](https://db.in.tum.de/~leis/papers/ART.pdf) is mainly used to ensure primary key constraints and to speed up point and very highly selective (i.e., < 0.1%) queries. ART indexes are automatically created for columns with a `UNIQUE` or `PRIMARY KEY` constraint and can be defined using `CREATE INDEX`.  
> **Warning.  ** ART indexes must currently be able to fit in-memory. Avoid creating ART indexes if the index does not fit in memory.  
#### Indexes Defined by Extensions {#docs:sql:indexes::indexes-defined-by-extensions}  
[Starting with version 1.1.0](https://duckdb.org/2024/09/09/announcing-duckdb-110#r-tree), DuckDB supports [R-trees for spatial indexing](#docs:extensions:spatial:r-tree_indexes) via the `spatial` extension.