Use EOF plan for alwaysFalse expressions within elemMatch

XMLWordPrintableJSON

    • Query Optimization
    • Fully Compatible
    • ALL
    • v8.1, v8.0
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 0

      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:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: