-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
As uncovered by SERVER-80576, nearly 40% of the optimization time of large $in queries is spent in copying the constant array argument of $in. This copying happens because of the ABT and Cascades designs that require ABT (sub)-trees to be copied when they are processed somehow.
One way to speed up such copies when an ABT query representation references large Constant objects is to avoid copying the Value that is contained inside the Constant.
The idea is that when a Constant is created to hold a new Value, the Value is stored in a constant pool, and then each subsequent invocation of Constant's copy constructor creates a new Constant that references the original Value.
This approach will likely benefit only large enough values such as strings and arrays.
- is related to
-
SERVER-80576 Microbenchmarks - investigate regression in $in queries
- Backlog