HTML

Database Index Types - HTML

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
<table>
<thead><tr><th>code</th><th>slug</th><th>name</th><th>description</th><th>category</th><th>supportedDatabases</th><th>useCases</th></tr></thead>
<tbody><tr><td>1</td><td>b-tree-index</td><td>B-Tree Index</td><td>The most commonly used balanced tree structure index.</td><td>General-purpose Index</td><td>[&quot;MySQL&quot;,&quot;PostgreSQL&quot;,&quot;Oracle&quot;,&quot;SQL Server&quot;,&quot;MongoDB&quot;]</td><td>[&quot;Equality searches&quot;,&quot;Range queries&quot;,&quot;Sorting operations&quot;,&quot;Primary keys&quot;,&quot;Foreign keys&quot;]</td></tr>
<tr><td>2</td><td>hash-index</td><td>Hash Index</td><td>An index providing constant-time access using hash functions.</td><td>Key-value Index</td><td>[&quot;Redis&quot;,&quot;MySQL (MEMORY)&quot;,&quot;PostgreSQL&quot;,&quot;Some NoSQL databases&quot;]</td><td>[&quot;Equality searches&quot;,&quot;Point lookups&quot;,&quot;Transaction processing&quot;,&quot;Key-value access&quot;]</td></tr>
<tr><td>3</td><td>bitmap-index</td><td>Bitmap Index</td><td>An index using bit arrays optimized for low-cardinality columns.</td><td>Analytical Index</td><td>[&quot;Oracle&quot;,&quot;PostgreSQL (extensions)&quot;,&quot;Data warehouse systems&quot;]</td><td>[&quot;Low-cardinality columns&quot;,&quot;Data warehousing&quot;,&quot;Complex filtering&quot;,&quot;Read-heavy environments&quot;]</td></tr>
<tr><td>4</td><td>full-text-index</td><td>Full-Text Index</td><td>An index specialized for searching unstructured text data.</td><td>Text Search Index</td><td>[&quot;MySQL&quot;,&quot;PostgreSQL&quot;,&quot;SQL Server&quot;,&quot;Elasticsearch&quot;]</td><td>[&quot;Full-text search&quot;,&quot;Partial match search&quot;,&quot;Similar word search&quot;,&quot;Document search&quot;]</td></tr>
<tr><td>5</td><td>vector-index</td><td>Vector Index</td><td>An index specialized for similarity search of high-dimensional vectors.</td><td>AI/ML Index</td><td>[&quot;PostgreSQL (pgvector)&quot;,&quot;Pinecone&quot;,&quot;Milvus&quot;,&quot;Weaviate&quot;]</td><td>[&quot;Similarity search&quot;,&quot;Image search&quot;,&quot;Recommendation systems&quot;,&quot;Semantic search&quot;]</td></tr>
<tr><td>6</td><td>spatial-index</td><td>Spatial Index</td><td>An index specialized for searching geospatial data.</td><td>Geospatial Index</td><td>[&quot;PostgreSQL (PostGIS)&quot;,&quot;MySQL&quot;,&quot;Oracle Spatial&quot;,&quot;MongoDB&quot;]</td><td>[&quot;Neighbor search&quot;,&quot;Range search&quot;,&quot;Distance calculation&quot;,&quot;Geographic information search&quot;]</td></tr></tbody>
</table>