-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
QO 2023-04-03, QO 2023-04-17
-
35
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.
- related to
-
SERVER-76684 Cached plans from inner $lookup single solution queries should be pinned
- Investigating