[SERVER-13337] Re-enable fast path for _id equality queries with projection Created: 24/Mar/14 Updated: 11/Mar/15 Resolved: 01/May/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | 2.6.2, 2.7.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Daniel Pasette (Inactive) | Assignee: | David Storch |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
| Comments |
| Comment by Githook User [ 06/Jun/14 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit 10d8b3d7984a4abf0d8f80562d426d2f5f0707c3) Conflicts: | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 16/May/14 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 14/May/14 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: | ||||||||||||||||||||||||||||||||||||||||||
| Comment by David Storch [ 06/May/14 ] | ||||||||||||||||||||||||||||||||||||||||||
|
We have benchmarked this change in order to evaluate its impact for simple id queries with projections. See below for the results for both simple inclusion projections (e.g. {a: 1, b: 1}) and exclusion projections (e.g. {a: 0, b: 0}).
The results suggest that the regression for simple id queries with simple inclusion projections in 2.6 is fixed with 10d8b3d7984a4abf0d. The patch results in about a 20% overall perf improvement. The patch also shows about 20% improvement for exclusion projections, but 2.6 is still slower than 2.4 for such queries. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 01/May/14 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: | ||||||||||||||||||||||||||||||||||||||||||
| Comment by J Rassi [ 25/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||
|
dan@10gen.com: this will cause queries to never be covered by compound indexes that include _id. That is, this will force a query like find({a:1,_id:1},{a:1,_id:1}) to use the {_id:1} index and do a fetch, even if there exists a better index like {a:1,_id:1} which would cover the query. Are you sure this is a good idea? |