Optimizing MongoDB Queries with Compound Indexes: Applying the Equality‑Sort‑Range Rule
Use a compound index in Equality‑Sort‑Range order to let MongoDB filter, sort, and apply range predicates in one scan. Verify with explain and watch write overhead.