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

[Classic] Cache single solution plans

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

      SERVER-75506 cached single solution plans when inside a $lookup, and saw up to a 9% improvement in TPCH benchmarks with no confirmed regressions. We should consider caching all single solution plans to get this perf improvement.

      Originally we did not cache single solution plans in classic to save space in the cache, and because planning was "fast enough". However the cache is clearly faster so we should look into this.

      SBE plans are always cached, and from what I've seen through $planCacheStats, they tend to take more space as well (compared to classic SolutionCacheData). So in terms of space it seems okay to cache classic plans always (of course this should be tested, and I also understand that the capacity limits are different for classic and SBE caches).

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            matt.boros@mongodb.com Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: