-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.0.0-rc7
-
Component/s: None
-
None
-
Query Optimization
The extraction of multiple top level fields can be represented in an SBE plan either as a series of getField() calls, or as a single scan over several slots.
Here is an example of the former (outputted by Bonsai):
[5] filter {shardFilter(s5, makeBsonObj(MakeObjSpec(drop, [], ["a", "b", "c"]), Nothing, s2, s3, s4))} [4] project [s4 = getField(s1, "c")] [3] project [s3 = getField(s1, "b")] [2] project [s2 = getField(s1, "a")] [1] scan s1 none none none none none none none lowPriority [] @"<collUUID>" true false
And of the latter (outputted by Stage Builders):
filter {shardFilter(s5, makeBsonObj(MakeObjSpec(drop, [], ["a", "b", "c"]), Nothing, s2, s3, s4))} scan [s2 = a, s3 = b, s4 = c]
The latter is far more efficient, and should be the behavior of Bonsai-generated plans as part of CQF.
- duplicates
-
SERVER-78507 [CQF] Satisfy RemoveOrphansRequirement for SargableNode with Complete/Seek target requirement
- Closed
- related to
-
SERVER-79403 Avoid implementing stacks of EvaluationNode as stacks of SBE project operators
- Closed