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

Cache single solution query plans

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Query Optimization
    • v8.0
    • QO 2024-03-18, QO 2024-04-01, QO 2024-04-15, QO 2024-04-29, QO 2024-05-13, QO 2024-05-27, QO 2024-06-10, QO 2024-06-24, QO 2024-07-08, QO 2024-07-22, QO 2024-08-05, QO 2024-08-19

      SERVER-75506 cached single solution plans in the classic engine 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 may be faster in most cases 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:
            Unassigned Unassigned
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated: