Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardMongoDBCovered queries internalsSingle-choice MCQ

A covered query is one the engine answers entirely from the index without fetching documents (no FETCH stage). Given index { a: 1, b: 1 } on a collection, why does this query fail to be covered even though every projected field is in the index?

db.t.find({ a: { $gt: 1 } }, { a: 1, b: 1 })