-
Type: Improvement
-
Resolution: Works as Designed
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
Hello team,
Ideally, the query should ignore the hint to non-existent index and proceed with query execution, as it may lead to severe downtime
db.test.find ().hint( "age_1" )
Uncaught:
MongoServerError: error processing query: ns=myFirstDatabase.testTree: $and planner returned error :: caused by :: hint provided does not correspond to an existing index
Specifying one of the preceding hints causes the optimizer to choose the specified access path only if the access path is available based on the existence of an index or cluster and on the syntactic constructs of the SQL statement. If a hint specifies an unavailable access path, then the optimizer ignores it.
Thank you,
Marina.