बुनियादी single-field indexes से परे, MongoDB advanced indexing strategies प्रदान करता है — compound index ordering (ESR rule), covered queries, partial/sparse indexes, TTL indexes, और अधिक — जो query performance को नाटकीय रूप से प्रभावित करती हैं। इनमें महारत हासिल करना scale पर MongoDB को optimize करने की कुंजी है।
Compound indexes के लिए ESR rule
For a compound index supporting a query with Equality, Sort, and Range conditions,
order the fields: EQUALITY → SORT → RANGE (the ESR rule).
