The main types of indexes used in databases.
Overview
Database Index Types
Database indexes are data structures used to speed up data retrieval. Various types exist depending on the use case, including B-Tree indexes, Hash indexes, and Bitmap indexes, each optimized for specific query patterns and data characteristics. Selecting the appropriate index is a crucial element in database performance optimization.
database
index
B-Tree
Hash
Bitmap
SQL
performance optimization
| code | slug | name | description | category | supportedDatabases | useCases |
|---|---|---|---|---|---|---|
| 1 | b-tree-index | B-Tree Index | The most commonly used balanced tree structure index. | General-purpose Index | ["MySQL","PostgreSQL","Oracle","SQL Server","MongoDB"] | ["Equality searches","Range queries","Sorting operations","Primary keys","Foreign keys"] |
| 2 | hash-index | Hash Index | An index providing constant-time access using hash functions. | Key-value Index | ["Redis","MySQL (MEMORY)","PostgreSQL","Some NoSQL databases"] | ["Equality searches","Point lookups","Transaction processing","Key-value access"] |
| 3 | bitmap-index | Bitmap Index | An index using bit arrays optimized for low-cardinality columns. | Analytical Index | ["Oracle","PostgreSQL (extensions)","Data warehouse systems"] | ["Low-cardinality columns","Data warehousing","Complex filtering","Read-heavy environments"] |
| 4 | full-text-index | Full-Text Index | An index specialized for searching unstructured text data. | Text Search Index | ["MySQL","PostgreSQL","SQL Server","Elasticsearch"] | ["Full-text search","Partial match search","Similar word search","Document search"] |
| 5 | vector-index | Vector Index | An index specialized for similarity search of high-dimensional vectors. | AI/ML Index | ["PostgreSQL (pgvector)","Pinecone","Milvus","Weaviate"] | ["Similarity search","Image search","Recommendation systems","Semantic search"] |
| 6 | spatial-index | Spatial Index | An index specialized for searching geospatial data. | Geospatial Index | ["PostgreSQL (PostGIS)","MySQL","Oracle Spatial","MongoDB"] | ["Neighbor search","Range search","Distance calculation","Geographic information search"] |