-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
0
Neither of the following operations use an index on total:
db.test.aggregate([ { $match: { $expr: { $let: { vars: { total: 100, }, in: { $gt: [ "$total", "$$total" ] } } } } }])
db.test.aggregate([ { $match: { $expr: { $let: { vars: { unused_var: 'unused_value', }, in: { $gt: [ "$total", 100 ] } } } } }])
We should improve this.
- is related to
-
SERVER-83524 Enable indexed plans for expressions with $$NOW, $$CLUSTER_TIME, and $$USER_ROLES
- Closed