Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Optimization
Description
When we invoke the optimizer with debugInfo, we print a trace of the groups and properties that we consider during optimization (example here). We often use these options in unit tests to aid in debugging when writing new rewrites.
When we consider a rewrite, we recursively optimize the children of the plan fragment and print the result of that. In the case that optimizeChildren() returns boost::none, we print "failed optimizing". However, there are two cases in which optimizeChildren() returns boost::none:
- We failed to find a plan which implements the given properties.
- We prune the search space because of branch & bound. That is, we don't consider implementing all of the children of the plan fragment because the cost of the current plan fragment we have consider is already over the limit.
When debugging, there is no way to distinguish between these two cases. When authoring new rewrites, it would be very helpful to quickly be able to understand which case we are in.
The purpose of this ticket is to add logging to be able to distinguish the aforementioned cases.