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

Optimizing expressions that are tautologically constant (e.g., `True` or `False`)

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization
    • Fully Compatible
    • QO 2023-10-16, QO 2023-10-30, QO 2023-11-13, QO 2023-11-27
    • 120

      Irina suggested in this comment that {$in: []} is tautologically "false" so it would be nice to optimize the plan to "return an empty result right away" rather than scanning anything.

            Assignee:
            c.alonso@mongodb.com Carlos Alonso Pérez
            Reporter:
            mohammad.dashti@mongodb.com Mohammad Dashti (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: