Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-91563

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

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 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

      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:
            christopher.harris@mongodb.com Chris Harris
            Reporter:
            marina.sirota@mongodb.com Marina Sirota
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: