I was wondering the same thing today and came across Romain's answer. Although I wanted to see this for myself, that can easily be done using the explanation for both units;
db.verpakking.explain().aggregate([ { "$match": {type: "VERPAKT"} }, { "$match": {ras: "CherryStar"} }, ]);
The result is the following:
{ "waitedMS" : NumberLong(0), "stages" : [ { "$cursor" : { "query" : { "$and" : [ { "type" : "VERPAKT" }, { "ras" : "CherryStar" } ] }, "queryPlanner" : { "plannerVersion" : NumberInt(1), "namespace" : "denberk.verpakking", "indexFilterSet" : false, "parsedQuery" : { "$and" : [ { "ras" : { "$eq" : "CherryStar" } }, { "type" : { "$eq" : "VERPAKT" } } ] }, "winningPlan" : { "stage" : "COLLSCAN", "filter" : { "$and" : [ { "ras" : { "$eq" : "CherryStar" } }, { "type" : { "$eq" : "VERPAKT" } } ] }, "direction" : "forward" }, "rejectedPlans" : [ ] } } } ], "ok" : NumberInt(1) }
Until
db.verpakking.explain().aggregate([ { "$match": {type: "VERPAKT", ras: "CherryStar"} }, ]);
Output Results:
{ "waitedMS" : NumberLong(0), "stages" : [ { "$cursor" : { "query" : { "type" : "VERPAKT", "ras" : "CherryStar" }, "queryPlanner" : { "plannerVersion" : NumberInt(1), "namespace" : "denberk.verpakking", "indexFilterSet" : false, "parsedQuery" : { "$and" : [ { "ras" : { "$eq" : "CherryStar" } }, { "type" : { "$eq" : "VERPAKT" } } ] }, "winningPlan" : { "stage" : "COLLSCAN", "filter" : { "$and" : [ { "ras" : { "$eq" : "CherryStar" } }, { "type" : { "$eq" : "VERPAKT" } } ] }, "direction" : "forward" }, "rejectedPlans" : [ ] } } } ], "ok" : NumberInt(1) }
As you can see, this is exactly the same, except for the "request" part (which is normal, since our request was ). This proves that if you use two separate consecutive $ match-pipelines or one combined $ match-pipeline, the parsed request will be exactly the same.