[SERVER-468] explain() broken for _id queries Created: 09/Dec/09 Updated: 12/Jul/16 Resolved: 12/Mar/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 1.1.4, 1.2.0, 1.3.0 |
| Fix Version/s: | 1.3.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
> db.foo.find() { "_id" : ObjectId("4b1fd7257a88ded6296525ba"), "k" : 3 }> db.foo.find( { "_id" : ObjectId("4b1fd7257a88ded6296525ba")}) { "_id" : ObjectId("4b1fd7257a88ded6296525ba"), "k" : 3 }> db.foo.find( { "_id" : ObjectId("4b1fd7257a88ded6296525ba")}).explain() { "_id" : ObjectId("4b1fd7257a88ded6296525ba"), "k" : 3 } |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 12/Mar/10 ] |
|
note, you can't do { query : {} }.explain() but { _id : xxx }.explain() is now working |
| Comment by auto [ 12/Mar/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: fix explain for _id lookup |
| Comment by Mathias Stearn [ 09/Dec/09 ] |
|
> db.foo.find({query:{ "_id" : ObjectId("4b1fd7257a88ded6296525ba")}}) { "_id" : ObjectId("4b1fd7257a88ded6296525ba"), "k" : 3 }> db.foo.find({query:{ "_id" : ObjectId("4b1fd7257a88ded6296525ba")}}).explain() }, }, }, } |