[SERVER-486] Two indexes same field, one ascending, one descending, cause no index to be used Created: 14/Dec/09 Updated: 15/Jan/10 Resolved: 14/Dec/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 1.1.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Doug Green | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
unix |
||
| Participants: |
| Description |
|
I had a collection that had two indexes, one ascending, and one descending mongo> db.url.getIndexes() , , This query was taking 6 seconds: Tue Dec 15 01:37:14 query scan_stats.url ntoreturn:1 reslen:224 nscanned:9236896 { hours.velocity: { $gt: 0.0 } } nreturned:1 6934 I removed the unnecessary index (the ascending one), and then the query became instantaneous. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 14/Dec/09 ] |
|
I can't reproduce this. |
| Comment by auto [ 14/Dec/09 ] |
|
Author: {'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: test for |