• Type: Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Sometimes, part of the predicate can be pushed down to the IXSCAN stage filter and minimise or even avoid fetching. 

      Predicate: NOR [a=1, a=2 & b=1]

      Sort: c_1

      Index: (c_1_a_1)

      Resulting query

       

      FETCH
          filter: NOR [a=1, a=2 & b=1]
          IXSCAN:
              pattern: (c_1_a_1)
      

       

      Optimal query:

       

       

      FETCH
          filter: NOR [a=1, a=2 & b=1]
          IXSCAN:
              filter: NOR [a=1, a=2]
              pattern: (c_1_a_1)
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            c.alonso@mongodb.com Carlos Alonso Pérez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: