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

Cached plans from inner $lookup single solution queries should be pinned

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Optimization

      Single solution queries should always pin their plan cache entry, so that they are not subject to replanning. It doesn't make sense to potentially replan these queries because we will never get a different result.

      For classic, the only single solution plans we cache are the inner $lookup queries. For SBE, we create cache entries for a broader set of single solution queries. This ticket can consolidate logic between SBE and classic for caching single solution queries.

      This should be done before SBE is enabled for the inner side of $lookup.

            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            matt.boros@mongodb.com Matt Boros
            0 Vote for this issue
            9 Start watching this issue