Skip to main content

Indexes

SereneDB supports two kinds of secondary index, each suited to a different access pattern: the Adaptive Radix Tree (ART) — the default index created by CREATE INDEX — enforces constraints and speeds up point lookups, while the inverted index powers full-text, vector and geospatial search.

Index Types

IndexCreatedPurpose
Adaptive Radix Tree (ART)Automatically for PRIMARY KEY / UNIQUE, or manuallyEnforce constraints and speed up highly selective point queries
Inverted IndexManually, with USING invertedFull-text search, vector / ANN search and geospatial search

Persistence

Both index types are persisted on disk.

CREATE INDEX and DROP INDEX

Indexes are created with CREATE INDEX and removed with DROP INDEX. The index type is selected with the USING clause (USING inverted for an inverted index); when omitted, an ART index is created. See CREATE INDEX for the full statement reference and the inverted index pages for the USING inverted syntax.

CREATE INDEX

DROP INDEX