-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
QE 2023-07-24, QE 2023-08-07, QE 2023-08-21
-
35
ProjectionPathASTNode getChild performs a linear search through a vector of field names to find the correct child. Because of this search, we see n^2 behavior on the number of fields in the $project. As we add children to this node in addNodeAtPathHelper, we also call getChild to search through everything we've added so far.
ProjectionPathASTNode could use a map instead of a vector to avoid this behavior.
This ticket should also involve performance testing with a map. If we see a regression, we could consider using a map when there are >50 (or some N) elements.
- related to
-
SERVER-62509 Write tests to stress ABT and Bonsai
- Closed