Details
-
New Feature
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Optimization
Description
When parameterization is enabled in CQF, the intervals generated in SargableNodes are no-longer guaranteed to have constant bounds, they will be expressions. While we do maintain a mapping of parameter ID to constant in the given query, simply replacing references to parameters with constants is not sufficient, we'd need to invoke constant folding to get back a set of intervals with constant bounds. Doing so would require copying an ABT with potentially large constants in it, which may have performance implications; since we don't have to mutate the ABT that CE is given, since that get inserted into the memo.
This ticket is a placeholder for work to design and implement a solution to this problem. One idea: disable interval simplification in SargableNode and estimate the CE of all predicates independently; this would allow direct replacement of parameter markers for their constant values.