[SERVER-192] query that just returns value in index should get data from index Created: 28/Jul/09 Updated: 12/Jul/16 Resolved: 16/Nov/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 1.7.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eliot Horowitz (Inactive) | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 20 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
if you have something like ) ) ) |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 16/Nov/10 ] |
|
Works with the caveats of the cases linked above |
| Comment by auto [ 16/Nov/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: use data from indexes if possivle |
| Comment by auto [ 16/Nov/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: safety for Projection's current state |
| Comment by auto [ 16/Nov/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: worked towards covered indexes |
| Comment by auto [ 02/Nov/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: some thoughts on getting things from indexes |
| Comment by Scott Hernandez (Inactive) [ 12/May/10 ] |
|
I'm testing on 1.5.1. I do id only queries where I want all the info from the default _id index and it should not touch the table at all. I am working with natural keys here so I know the values of the _id, most of the time. In most of my queries I send along a filter for _id in [values], but sometimes I need to get all the _id values to check for referential integrity in another collection (as a cleanup job). > db.idOnly.save({_id:1}) ] }, } |
| Comment by Eliot Horowitz (Inactive) [ 26/Mar/10 ] |
|
|
| Comment by Michael Dirolf [ 26/Mar/10 ] |
|
one possible solution to the _id problem is |
| Comment by Scott Hernandez (Inactive) [ 26/Mar/10 ] |
|
I'm all for making _id optional; let me decide the performance ramifications when I make the query. However... the default should return the _id; |
| Comment by Eliot Horowitz (Inactive) [ 15/Mar/10 ] |
|
this is complicated since we return _id no matter what. |
| Comment by auto [ 15/Mar/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: commited and reverted so the code exists This reverts commit aa6c394b72667bb59effcdb4f13a0c70202e7258. |
| Comment by auto [ 15/Mar/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: stalled attempt at covered index lookup |