Why MongoDB different query plans show different nReturned value?
I have a collection faults in my MongoDB database which every document has these fields: rack_name , timestamp Just for sake of testing and comparing performances, I have created these two indexes: rack -> {'rack_name': 1} and time -> {'timestamp': 1} Now I executed the following query with explain(): db.faults.find({ 'rack_name': { $in: [ 'providence1', 'helena2' ] }, 'timestamp': { $gt: 1501548359000 } }) .explain('allPlansExecution') and here is the result: { "queryPlanner" : { "plannerVersion" : 1, "namespace" : "quicktester_clone.faults", "indexFilterSet" : false, "parsedQuery" : { "$and"