[SERVER-75457] Allow MatchExpression to match Document Created: 29/Mar/23 Updated: 22/Jan/24 Resolved: 22/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Boros | Assignee: | Backlog - Query Optimization |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Participants: | |||||||||
| Description |
|
$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. |
| Comments |
| Comment by Matt Boros [ 22/Jan/24 ] |
|
Already marked as dup |