-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
Currently, SBE plan for query
> db.c.createIndex({a:1, b: 1}) > db.c.find({a: {$gt: 3}}, {_id: 0, a: 1, c: {$add: ["$a", "$b"]}}).explain()
Will create an intermediate object, then extract values for fields a and b, compute expression and create final object. We can skip intermediate object and compute expressions directly using slots from index scan. Same strategy is applied for inclusion projections inĀ SERVER-54745.
- is related to
-
SERVER-54745 Avoid creating intermediate object in covered SBE plans
- Closed