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

[v7.0] Enable indexed plans for expressions with $$NOW, $$CLUSTER_TIME and $$USER_ROLES

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.13
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • QO 2024-06-24, QO 2024-07-08, QO 2024-07-22
    • 200

      SERVER-83524 solved this problem for the master (8.1) and 8.0 branches by enabling the constant folding of ExpressionFieldPath referencing a system variable. We were able to do this safely because the SBE plan cache was disabled on those branches as part of SERVER-90415 (but not backported to 7.0). This meant that system variables could be safely constant folded since only index tag were cached, rather than entire SBE plans, which ended up having system variable values "embedded" in the cached plan (as seen in SERVER-74264).

      This ticket tracks work to enable indexed plans for expressions with system variables on the 7.0 branch. We plan to achieve this by updating the fallback mechanism to disable SBE when a system variable is referenced in an expression.

            Assignee:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: