-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
$match converts its input to BSON because MatchExpression only takes BSON or MatchableDocument.
Converting Document to BSON made sense when this code was written, but is tech debt we should consider addressing.
The amount of time spent performing this conversion is close to the time it takes to actually perform the match. (Flamegraph attached. This data was taken from TPCH Q7.) $match could be significantly faster.
- duplicates
-
SERVER-25304 Allow a MatchExpression to match a Document
- Backlog