Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.4.10
Description
If an aggregation pipeline contains multiple $match commands next to each other, they should be treated like a single $match with the items combined with $and.
I noticed a huge difference (around a factor of 100) when i tried
{$match: {"non-indexed-property": "value"}}, {$match: {"indexed-property": "value"}}
|
vs.
{$match: {"$and": [{"non-indexed-property": "value"}, {"indexed-property": "value"}]}}
|
Attachments
Issue Links
- duplicates
-
SERVER-11184 Perf : merge consecutive calls to $match
-
- Closed
-