[SERVER-78631] [CQF] Replace linear search in BoolExpr::Builder Created: 03/Jul/23 Updated: 27/Oct/23 Resolved: 07/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Boros | Assignee: | Backlog - Query Optimization |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
The BoolExpr::Builder linearly searches through nodes to deduplication while building. For large expressions this is inefficient. We could instead hold a set data type of nodes. This was an issue for large $match of the form
As part of this ticket, we should run performance tests to see if adding an extra set to the builder slows down smaller queries. |
| Comments |
| Comment by Matt Boros [ 07/Aug/23 ] |
|
Fixed by |
| Comment by Matt Boros [ 19/Jul/23 ] |
|
In This structure didn't fit cleanly into the |
| Comment by Matt Boros [ 03/Jul/23 ] |
|
This is a neatly scoped task that would be well suited for Bonsai onboarding or an intern. |