the query should ignore the hint to non-existent index and proceed with query execution

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

      Similar to Oracle:

      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.

              Assignee:
              Chris Harris
              Reporter:
              Marina Sirota
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: