[SERVER-2273] Covered index query scans docs Created: 22/Dec/10 Updated: 22/Dec/10 Resolved: 22/Dec/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.7.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
It seems like it doesn't use the index (no indexOnly) to get data in the last find. > for (var i = 1; i <= 10000; i++) db.things.save( {value : i}); } ) ).explain() } |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 22/Dec/10 ] |
|
You need to say you don't want the _id index db.things.find({value:{$gt: 500}}, {value:1,_id:0}).explain() |