[SERVER-14311] skipping of index keys is not accounted for in plan ranking by the index scan stage Created: 19/Jun/14 Updated: 11/Jul/16 Resolved: 11/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.6.2, 2.6.3 |
| Fix Version/s: | 2.6.4, 2.7.4 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Asya Kamsky | Assignee: | David Storch |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
Issue Status as of Jun 20, 2014 ISSUE SUMMARY
It is cheaper to use index {a:1, b:1} for queries with predicates over fields a and b, because for index {a:1, x:1, b:1} it may be necessary to skip many keys due to the interceding x field. Another example where this issue appears is the following:
Plans using the two indices tie in this case. This can cause the plan ranker to use index {b: 1, c: 1} rather than the obviously better {a: 1} index. USER IMPACT WORKAROUNDS AFFECTED VERSIONS FIX VERSION RESOLUTION DETAILS Original descriptionPossible a missed variant of |
| Comments |
| Comment by Githook User [ 21/Jul/14 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |
| Comment by Atul Kachru [ 16/Jul/14 ] |
|
Setting CAP Verification : Needed. |
| Comment by Githook User [ 11/Jul/14 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |
| Comment by Githook User [ 11/Jul/14 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |
| Comment by Wei Kong [ 27/Jun/14 ] |
|
Which release will this fix be available? |
| Comment by Ian Daniel [ 20/Jun/14 ] |
|
Hi Wei, I have raised the priority of this ticket to P2. Regards, |
| Comment by Wei Kong [ 19/Jun/14 ] |
|
Any reason this ticket is p3 while |