Currently the parameter re-use has a complexity of O(n^2), due to the use of find_if on a vector, which works fine for small number of expressions within a query. With an increasing number of Expressions an implementation with a map can be superior compared to the find_if on a vector.
Here we need to implement a hybrid approach to use a vector for small number of expressions and a map for larger number of expressions. To hash an expression the expression hashing function from the boolean simplification project should be used.
- depends on
-
SERVER-79018 Implement MatchExpression hasher
- Closed
- is duplicated by
-
SERVER-79393 Expression parameterization input param ID generation is slow for large queries
- Closed
- is related to
-
SERVER-78752 An incorrect plan can be written to the SBE plan cache for certain $or queries, leads to incorrect query results
- Closed
- related to
-
SERVER-62509 Write tests to stress ABT and Bonsai
- Closed