-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In predicate inference we create a new find command request + CQ every time we want to add an inferred predicate. This is on top of the CQ that we already create for each node.
Instead, we should determine all our predicates ahead of time, and only afterwards generate a CQ for each node (after predicate inference). We don't need CQs until after we finished generating the whole AggJoinModel anyway.
One thing to be careful of: if we avoid creating a CQ in the first place for each $lookup node/ the pipeline prefix, we will probably need to split out the logic that determines the prefix eligible for CQ pushdown into a separate check.