-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.3
-
Component/s: Index Maintenance, Querying
-
Query Optimization
-
Query Optimization 2021-02-22, Query Optimization 2021-03-08
-
(copied to CRM)
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.
- depends on
-
SERVER-12869 Index null values and missing values differently
- Backlog
- is duplicated by
-
SERVER-29326 count query with null criterion can't be covered by non-sparse index
- Closed
-
SERVER-49845 allow indices to optionally cover missing values
- Closed
-
SERVER-36990 Indexed filed still exists in FETCH step
- Closed
- is related to
-
SERVER-55065 Null queries should be covered by index where possible with current index format
- Closed
- related to
-
SERVER-5065 a missing field nested within an array is sorted as 'null', even if the same field exists inside another array element
- Closed
-
SERVER-27646 covered index should be used when null inequality is in the query and index is not multikey
- Closed
-
SERVER-12869 Index null values and missing values differently
- Backlog
-
SERVER-18653 Answering "equality to null" predicates with an index requires a FETCH stage
- Closed