MongoDB Indexes Deep Dive

Parent: MongoDB Expert Knowledge · Published reference · snapshot 2026-09-08 · skill mongodb-expert/references/mongodb-indexes-deep.md

↓ Facts as markdownall context files

Reference for every MongoDB index type, ordering strategies, build mechanics,

These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.

MongoDB Indexes Deep Dive

Quick-Reference Cheat Sheet

1. Single-Field Indexes

2. Compound Indexes — The ESR Rule

ESR Rule (Equality → Sort → Range)

Prefix Matching

Sort Direction in Compound Indexes

3. Multikey Indexes — Indexing Arrays

Multikey Bounds

Parallel Arrays Restriction

4. Partial Indexes

Storage Savings

5. Sparse Indexes

Sparse vs Partial

6. TTL Indexes — Automatic Document Expiration

Requirements

Atlas Consideration

7. Text Indexes — Full-Text Search

Text Index vs Atlas Search

8. Wildcard Indexes — Flexible Schema Indexing

How Wildcard Indexes Work

Restrictions

9. Hashed Indexes — Sharding by Hash

Characteristics

10. 2dsphere Indexes — Geospatial Queries

GeoJSON Types Supported

Notes

11. Unique Indexes

Unique + Sparse

Duplicate Key Errors

12. Index Intersection

Compound Index vs Intersection

Modern Index Builds (MongoDB 4.2+)

Rolling Index Builds (Replica Sets)

Atlas Index Management UI

Selectivity

Covering Indexes (Index-Only Queries)

Index Memory Footprint

15. Hidden Indexes — Safe Removal Testing

Workflow for Safe Index Removal

Constraints

16. hint() — Forcing a Specific Index

Caution

Index Bloat and Fragmentation

18. Time Series Collection Index Constraints

References

Where this helps

Project ideas

Antipatterns

Known issues

Children

Frontier under this node: Compound Indexes and ESR Rule, Hashed Indexes, Hidden Indexes, Index Anti-Patterns, Index Build Strategies, Index Intersection, Index Selectivity and Covering Queries, Multikey Indexes, Partial Indexes, Single-Field Indexes, Sparse Indexes, TTL Indexes, Text Indexes, Unique Indexes, Wildcard Indexes, hint() and Index Forcing

← the whole tree · 3D view· how to read this page