Back to Developer Roadmap

Compound Indexes

src/data/roadmaps/mongodb/content/[email protected]

4.0711 B
Original Source

Compound Indexes

Compound indexes in MongoDB are built on multiple fields in a specified order, optimizing queries that filter on multiple fields. Field order matters significantly as it determines which queries can efficiently use the index. Compound indexes support prefix patterns, meaning they can optimize queries on any left subset of the indexed fields, making them versatile for various query patterns.

Visit the following resources to learn more: