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

      Currently, the join plan cache key does not encode the state of runtime server parameters (query knobs, IFR flags, etc) so cache hits can occur for joins of the same shape despite differing server parameters. Similarly, the join plan cache also does not do any invalidation when one of these server parameters is updated.

      The classic plan cache also does not encode the server parameter state nor does it invalidate cache entries if the state does change.

      The SBE plan cache (pre cleanup ticket SERVER-128246) used to have an on_update hook that would clear the SBE plan cache.

      Open questions:

      1. Is this important for the join plan cache? We have quite a few knobs that control the behavior of the optimizer
      2. Do we want to encode only some query knobs or all server parameter state + IFR flags?
      3. Should we go for a cache key encoding or invalidation on server parameter update?
        1. Can the on_update hook also work for IFR flags?

            Assignee:
            Unassigned
            Reporter:
            Naafiyan Ahmed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: