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

Ensure plans cached in SBE plan cache allow indexed plans for predicates referencing system variables

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

      In SERVER-83524, we enabled the constant optimization for ExpressionFieldPath referencing a system variable ($$NOW, $$CLUSTER_TIME and $$USER_ROLES). This allowed for queries referencing a variable to use an index. We had to disable this optimization when featureFlagSbeFull is enabled because otherwise an incorrect value of the system variable may get embedded into the cached plan, as was the case in SERVER-74264.

      This ticket tracks work to design and implement a solution that would allow SBE plan cache to handle this case.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: