[SERVER-79092] Optimize the expression search for parameter reuse during parameterization Created: 19/Jul/23 Updated: 29/Oct/23 Resolved: 07/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Peter Volk | Assignee: | Henri Nikku |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Sprint: | QO 2023-09-04, QO 2023-09-18 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 07/Sep/23 ] |
|
Author: {'name': 'henrinikku', 'email': 'henri.nikku@mongodb.com', 'username': 'henrinikku'}Message: |
| Comment by Matt Boros [ 07/Aug/23 ] |
|
We would like this to be scheduled to unblock |
| Comment by Matt Boros [ 31/Jul/23 ] |
|
Is the plan to do this after |
| Comment by Matt Boros [ 31/Jul/23 ] |
|
This issue is similar to |