-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.1.0
-
Component/s: Query Planning
-
None
-
Fully Compatible
-
QE 2021-08-23, QE 2021-09-06, QO 2021-09-20
-
165
*strong text*The new SBE plan cache will be bounded by a number of bytes rather than a number of cache entries, using an LRU replacement policy. As preparatory work to support this behavior, we need to be able to estimate the size of an SBE tree. The goal of this ticket is to add such a capability, so that it can be used for the SBE plan cache later.
We wish to calculate the "compile-time size", meaning the size of the SBE tree before it has been prepared or executed. This is because SBE trees will be stored in the plan cache in an unprepared, unexecuted state. The size should incorporate all of the sbe::PlanStage objects, as well as any expression trees they own, or any other resources owned by the sbe::PlanStage.