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

Queries matching null value should be fully covered by index

    XMLWordPrintable

Details

    • Query Optimization 2021-02-22, Query Optimization 2021-03-08

    Description

      Because of issue closing SERVER-18653 I open a feature request for the important improvement.

      Assume, we have a collectoin with documents like

      {}, {a:1}, {a:[]}, {a:null}
      

      Also we have an non sparse index on "a" field.

      If we query all documents where a doesnt exist or null with {a: null}, an engine always fetches documents even having field indexed.

      Need to improve query planner to allow query null valued field and to build an index which can detect collisions with array values.

      Attachments

        Issue Links

          Activity

            People

              Votes:
              16 Vote for this issue
              Watchers:
              43 Start watching this issue

              Dates

                Created:
                Updated: