-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
When skipping the Filter->Sargable transformation, the optimizer doesn't generate partial schema requirements, and consequently doesn't callĀ
PartialSchemaReqLowerTransport which in turn would call consolidateEqDisjunctions(). As a result not all disjunctions are consolidated into a single eqMember. This task should:
- Rewrite disjunctions of the form: {$or: [
{a: 1}
, {a: 2}, {b: 3}]} into eqMember.
- Consolidate eqMember on the same field into one eqMember.
- Remove duplicate members.
The potential performance benefit of this rewrite should come from:
- potentially removing duplicate disjunctions
- reducing the size of the SBE plan, and using a single traverseF with a single isMember instead of multiple traverseF for each equality.
This rewrite could be done as part of a more general simplification.
- duplicates
-
SERVER-84351 [CQF] Missing $or simplification
- Backlog
- is depended on by
-
SERVER-83456 Skip Filter->Sargable rewrite for collscan plans
- Closed
- is duplicated by
-
SERVER-84351 [CQF] Missing $or simplification
- Backlog
- related to
-
SERVER-85626 Complete TODO listed in SERVER-83574
- Backlog