MongoDB Compound Index Design: ESR, Selectivity, Covering and Multikey Bounds

Parent: MongoDB Indexes Deep Dive · Published reference · snapshot 2026-10-19 · skill mongodb-expert/references/mongodb-compound-index-design.md

Also known as: Compound Indexes and ESR Rule, Index Anti-Patterns, Index Intersection, Index Selectivity and Covering Queries, Multikey Indexes, Multikey Indexes and Array Query Bounds, Partial Indexes, Sparse Indexes

↓ Facts as markdownall context files

A compound index stores references ordered by several fields; key order (equality fields first, then sort, then range — the ESR guideline), selectivity, prefix rules, covered queries, multikey index bounds with $elemMatch and partial/sparse filter semantics decide whether a query can use the index and how many keys and documents it examines. Compiled from MongoDB manual and Atlas pages plus the run's verified claims.

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.

Definitions

Structure and components

How it works

How-to and procedures

Examples and snippets

Measurements and reference values

Problems, failure modes and limitations

Comparisons and alternatives

Facts and statements

Related concepts

Children

Frontier under this node: Sparse versus partial index equivalence, multikey index sort behaviour

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