[SERVER-128] Index not used in Multikeys with $in operator Created: 06/Jul/09 Updated: 30/Jul/09 Resolved: 06/Jul/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 0.9.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kirill Mavreshko | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu Server 9.04, 768 RAM, fresh installation of MongoDB 0.9.5, pymongo connector |
||
| Participants: |
| Description |
|
I create simple test similar described in docs (http://www.mongodb.org/display/DOCS/Multikeys) for problem demonstration: connection = Connection("localhost", 27017) db.create_collection("example")
for item in samples: ) db.example.ensure_index("test",1) print "Result:" print "\nQuery Explain:" After run it, I receive explain output: , , , When I try to get records without IN explain = db.example.find( {"test":9000}).explain() result look as: {u'allPlans': [{u'cursor': u'BtreeCursor test_1', , , , It's a normal behavior? |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 30/Jul/09 ] |
|
closed since resolved and no activity in 2 weeks. |
| Comment by Eliot Horowitz (Inactive) [ 06/Jul/09 ] |
|
It uses the index, but right now is stupid and looks at the entire range. |