-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
right now you have to specify the exact name of the index for the hint to work. I'm finding a lot of cases where Mongo does not pick the right index when a sort is used. Using hint I need to specify the exact compound index and it make the code brittle because if the index is not there as-is then those queries will just fail. Hinting would be much more usable if it allows to match a prefix.
For example:
- index { tenantId, userId, time, coveredField }
- hint on
{ tenantId, userId }
should just match that index
- is related to
-
SERVER-12584 Query: planner returns bad hint error for hint on compound index
-
- Closed
-