-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- is related to
-
SERVER-92417 [v7.3] Enable indexed plans for expressions with $$NOW, $$CLUSTER_TIME and $$USER_ROLES
- Closed
-
SERVER-91993 [v7.0] Fix now_variable.js in classic engine
- Closed
-
SERVER-83524 Enable indexed plans for expressions with $$NOW, $$CLUSTER_TIME, and $$USER_ROLES
- Closed