[SERVER-75506] Cache $lookup inner query plans with single solution Created: 30/Mar/23 Updated: 29/Oct/23 Resolved: 11/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Boros | Assignee: | Matt Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | perf-70-blocker | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | QO 2023-04-03, QO 2023-04-17 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 35 | ||||||||||||||||
| Description |
|
For $lookup inner queries that have only one query solution, we do not multiplan and therefore do not cache. However caching these plans is beneficial to performance, we are seeing an 8% overall improvement in TPCH Q11 throughput and 3% improvement in TPCH Q7. To avoid affecting a large class of queries, we should only force the cache when the query comes from a lookup. We can set a variable via the ExpressionContext to communicate this flag. |
| Comments |
| Comment by Githook User [ 11/Apr/23 ] |
|
Author: {'name': 'Matt Boros', 'email': 'matt.boros@mongodb.com', 'username': 'mattBoros'}Message: |
| Comment by Matt Boros [ 05/Apr/23 ] |
|
Here's a summary of the performance changes for TPC-H queries affected by this ticket. I will also look into non-TPCH benchmarks for $lookup. |