[SERVER-22631] Improve efficiency of matching during an aggregation pipeline. Created: 16/Feb/16 Updated: 03/Jan/17 Resolved: 13/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.5 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Benjamin Murphy |
| Resolution: | Done | Votes: | 0 |
| Labels: | optimization | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Sprint: | Query 13 (04/22/16) | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
It's currently very expensive to perform a $match within the aggregation pipeline. This is mostly because the aggregation pipeline works with Documents, which are incompatible with the current MatchExpression::matchesBSON interface, so we have to construct an entirely new BSONObj to match on. There are two things we could do to make this more efficient:
|
| Comments |
| Comment by Githook User [ 10/Nov/16 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'cswanson310@gmail.com'}Message: PERF-784 Add perf tests for |
| Comment by Githook User [ 10/Nov/16 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'cswanson310@gmail.com'}Message: PERF-784 Add perf tests for |
| Comment by Benjamin Murphy [ 13/Apr/16 ] |
|
Commit 6df76e05dbd86827af7ae9b9676833348537f870 took approach #1. The second approach is still possible, and would likely result in more performance improvements, but would require significantly longer to implement. |
| Comment by Githook User [ 13/Apr/16 ] |
|
Author: {u'username': u'benjaminmurphy', u'name': u'Benjamin Murphy', u'email': u'benjamin_murphy@me.com'}Message: |