[SERVER-8346] Allow Query Hints by Index Name Created: 25/Jan/13 Updated: 07/Mar/14 Resolved: 25/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Querying, Usability |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Reuben Garrett | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | indexing, mongos, query | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Support Query Hinting by Index Name in the Mongo shell, as addressed in
I noticed an old ticket ( Sure, developers "should" normally know the structure of the indices they're using. However, in some cases we might just be using an index to ensure quick sorting on an abstract property, regardless of which document fields that property happens to cover. Query hints are a key area to realize the value of index names, because symbolic names can allow developers to vary index definition in response to "schema" adjustments (albeit Mongo is NoSQL, we still have pseudo-schemas) without impacting the optimization of downstream queries. And, given that field names are often optimized to a fine point just to reduce storage size (see Indices are the pith of queries, and index names are the closest Mongo has to named views. Let's take them to the next level and allow hinting on index names! |
| Comments |
| Comment by Reuben Garrett [ 26/Jan/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
I'm so sorry, scotthernandez - I did not test this adequately before opening a ticket. I apologize for the spurious ticket, and thank you for the functionality! | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 25/Jan/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
It already works this way:
|