[SERVER-1017] Does the $ne operator skip the index? Created: 13/Apr/10 Updated: 26/Apr/10 Resolved: 13/Apr/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 1.4.0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | Ben Wyrosdick | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
When you use the $ne operator it seems to skip the index (unless I am reading the explain wrong) is that intentional? > db.quotations.find({noteworthy: {"$ne": false}}).limit(25).explain() , ] versus me changing out {$ne: false} to true (I know it isn't equivalent) > db.quotations.find( {noteworthy: true}).limit(25).explain() , { "noteworthy" : true } ] , { "noteworthy" : true } ] |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 13/Apr/10 ] |
|
it tries both and figures out which one is generally faster. |