[SERVER-13066] Negations over multikey fields do not use index Created: 05/Mar/14 Updated: 11/Jul/16 Resolved: 04/Apr/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | 2.6.1, 2.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Michael Kennedy | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Major Change | ||||
| Backport Completed: | |||||
| Participants: | |||||
| Description |
|
Issue Status as of April 15, 2014 ISSUE SUMMARY USER IMPACT WORKAROUNDS RESOLUTION AFFECTED VERSIONS PATCHES Original descriptionThis query does not seem to use an index at all even when it exists:
Notice the DB (referenced below), has an index:
Yet, when you explain the query, you see basic cursor:
To see this in action, open the BookStore.zip file from this issue: |
| Comments |
| Comment by Githook User [ 09/Apr/14 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit 7aa932a23fd1c429d7b3d8cbd96d865526c149c9) |
| Comment by David Storch [ 03/Apr/14 ] |
|
This issue is now resolved in master and will be backported to the 2.6 branch after 2.6.0 ships. |
| Comment by Githook User [ 03/Apr/14 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |
| Comment by Michael Kennedy [ 07/Mar/14 ] |
|
Thank you for addressing this. |
| Comment by David Storch [ 07/Mar/14 ] |
|
Hi Michael, Thanks for the detailed bug report! It looks like the problem is that the negation predicates are not using the index because the index is multikey. I'm going to move the "fixVersion" to "Needs Triage" so that our engineering team can decide on a schedule for working on this. Best, |
| Comment by Michael Kennedy [ 05/Mar/14 ] |
|
Sorry I forgot to add this when I submitted: I tested this both on 2.4.9 and 2.6.0_rc0. |