[DOCS-9547] Docs for SERVER-19153: Conditionally push $match before $project Created: 05/Dec/16 Updated: 27/Oct/17 Resolved: 24/Oct/17 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Emily Hall | Assignee: | Nicholas Larew |
| Resolution: | Done | Votes: | 0 |
| Labels: | bi-performance, optimization | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Days since reply: | 6 years, 16 weeks, 1 day ago | ||||||||||||||||||||
| Description |
|
Engineering Ticket Description: I was looking at the optimizing aggregation pipelines docs page and didn't see this one listed. This is only possible if the subsequent $match doesn't use any computed fields, but there could be a large win with regards to index usage if you could move the $match prior to a $project. For example:
is the same as
because the $match is only using fields that exist in the original document. |
| Comments |
| Comment by Kyle Suarez [ 24/Oct/17 ] |
|
Thanks, nick.larew! |
| Comment by Nicholas Larew [ 24/Oct/17 ] |
|
Hi Kyle, There is a PR on the docs repo for this ticket and |
| Comment by Kyle Suarez [ 24/Oct/17 ] |
|
Is there a docs commit with the changes? |