[SERVER-10613] Optimize simple aggregations using $redact followed by a $match Created: 23/Aug/13 Updated: 28/Oct/15 Resolved: 11/Oct/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Performance |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Description |
|
Current (2.5.2) implementation will not use any indexes if the first operation in the pipeline is $redact. If the pipeline starts with [$redact, $match, ...] we can in some circumstances convert the query to [$match, $redact, $match, ...] and get the same results. Known cases where this won't be allowed:
|
| Comments |
| Comment by auto [ 11/Oct/13 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: If possible, inserts a subset of the $match before the $redact to enable |