Enable covered query for $expr with $eq only

XMLWordPrintableJSON

    • Query Optimization
    • QO 2024-02-05, QO 2024-02-19, QO 2024-03-04, QO 2024-03-18
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hello,

      When using $expr, a query that should be covered by the index actually examine documents.

      Not only that, it searches for the values twice, once during the index scan and a second time during the fetch stage.

        1. Screenshot 2026-03-16 at 17.27.35.png
          152 kB
          Milena Ivanova
        2. Screenshot 2026-03-16 at 17.29.01.png
          154 kB
          Milena Ivanova

            Assignee:
            Milena Ivanova
            Reporter:
            Miguel Ángel Nieto
            Votes:
            5 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated: