-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When we analyze a plan to determine which engine to use, we create a state machine that we used to pattern match on the QSN. This state machine detects whether the QSN is a plan pattern we have allowed for $lookup-$unwind or not.
This state machine is constructed every time engine selection is invoked, because the exact patterns we allow depends on IFR flags, which can change at runtime.
We should investigate whether we can statically create the state machine using the approach described here. This could reduce the overhead of engine selection if we add many more plans to the state machine