Use EOF plan for alwaysFalse expressions within elemMatch

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • v8.0
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-81863 forgot to also consider cases where alwaysFalse is nested within elemMatch. As a result of that, and in combination with SERVER-70477, we caused a regression identified in HELP-75546 where a query like {$elemeMatch: {$in: []}} is now translated to {$elemMatch: {$alwaysFalse: 1}} and thus requires COLLSCAN since neither index bounds can be applied nor an EOF plan is considered.

      Unfortunately hinting the right index doesn't work either since a full IXSCAN would be required

            Assignee:
            Carlos Alonso Pérez
            Reporter:
            Carlos Alonso Pérez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: