Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75506

Cache $lookup inner query plans with single solution

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • Fully Compatible
    • QO 2023-04-03, QO 2023-04-17
    • 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.

      Slack discussion

      Attachments

        Activity

          People

            matt.boros@mongodb.com Matt Boros
            matt.boros@mongodb.com Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: