[SERVER-10436] wrong index ranges when using compound index on a list Created: 05/Aug/13 Updated: 10/Dec/14 Resolved: 06/Dec/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Antoine Girbal | Assignee: | David Storch |
| Resolution: | Duplicate | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Creating documents of this form with a compound index:
Matching with equality on the value works well:
Range queries on value do not work well though, see the upper bound is largest possible integer:
If stacking a 2nd $elemMatch (just for kicks) then the ranges seem correct in explain but it does not match any document:
|
| Comments |
| Comment by David Storch [ 06/Dec/14 ] |
|
All, I am going to close this ticket as a duplicate of a more recently filed request ( The comments on Please watch Best, |
| Comment by Antoine Girbal [ 23/Oct/13 ] |
|
kmeredith please try out the unstable 2.5.3 build that was just released, the index optimizer was thoroughly reworked. |
| Comment by Kevin Meredith [ 23/Oct/13 ] |
|
Any status on this? Also, would this bug cause a problem with the `nScanned` exceeding the `db.collection.count()`? I faced such a problem here - http://stackoverflow.com/questions/19526903/mongodb-index-ensureindex-time-to-refresh. |
| Comment by Antoine Girbal [ 10/Aug/13 ] |
|
Those are related common use cases. SERVER-10394 has a workaround, |