-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
1. If we have a positive predicate and {$exists: true} in one conjunction we can remove {$exists: true}. E.g.
{a: {$eq: 1, $exists: true}} == {a: 1}
2. The same idea with {$ne: null}:
{a: {$eq: 1, $ne: null}} == {a: 1}
3. A positive predicate and {$exists: false}:
{a: {$eq: 1, $exists: false}} == {$alwaysFalse: true}
4. A negative predicate and {$exists: false}:
{a: {$ne: 1, $exists: false}} == {a: {$ne: 1}}
- related to
-
SERVER-35018 remove unnecessary FETCH from plan when fetch tests condition that's implied by indexed condition
- Backlog
- split from
-
SERVER-75079 Simplify boolean expressions before feeding them to the optimizer
- Closed