advancedMongoDB Performance Optimization — Explain Plan, Covered Queries & Pagination
What makes a query 'covered,' and why is it the fastest possible query shape?
A covered query is one where every field the query needs — both the filter and the projected output — exists entirely within the index itself, so MongoDB can answer it straight from the index without ever fetching the underlying document. It's fastest because it skips an entire additional disk/memory access that a normal indexed query still has to pay for.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
What makes a query 'covered,' and why is it the fastest possible query shape?