-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
QO 2023-09-04, QO 2023-09-18, QO 2023-10-02, QO 2023-10-16, QO 2023-10-30, QO 2023-11-13, QO 2023-11-27
-
35
Plans which include projections in Bonsai can produce additional SBE code that may be negatively impacting the performance of projection microbenchmarks. For example, the SBE plan generated by the stage builders for the simple query db.a.find({}, {a: 1, b: 1, c: 1}) is:
$$RESULT=s6 env: { s3 = 1690384319772 (NOW), s1 = TimeZoneDatabase(Asia/Phnom_Penh...Africa/Bamako) (timeZoneDB), s2 = Nothing (SEARCH_META) } [2] mkbson s6 s4 [_id, a, b, c] keep [] true false [1] scan s4 s5 none none none none none none lowPriority [] @"01f02723-1a68-44b2-9267-469b17d04b76" true false
While the SBE plan generated by Bonsai is much more complicated:
$$RESULT=s6 env: { s1 = Nothing (shardFilterer) } [1] project [s6 = let [ l101.0 = let [ l102.0 = let [ l103.0 = if (exists(s2) || isObject({})) then setField({}, "_id", s2) else {} ] in if (exists(s3) || isObject(l103.0)) then setField(move(l103.0), "a", s3) else move(l103.0) ] in if (exists(s4) || isObject(l102.0)) then setField(move(l102.0), "b", s4) else move(l102.0) ] in if (exists(s5) || isObject(l101.0)) then setField(move(l101.0), "c", s5) else move(l101.0) ] [0] scan none none none none none none none none lowPriority [s2 = _id, s3 = a, s4 = b, s5 = c] @"01f02723-1a68-44b2-9267-469b17d04b76" true false
- fixes
-
SERVER-80577 Microbenchmarks - investigate regression in exclusion projections on dotted paths
- Closed
- is depended on by
-
SERVER-80579 Microbenchmarks - investigate regressions in projection benchmarks
- Backlog
-
SERVER-81851 Constant-fold makeBsonObj
- Backlog
-
SERVER-80578 Microbenchmarks - investigate regression in wide projection benchmarks
- Closed
-
SERVER-81888 Path fusion rewrite to mark the root of any constant path subtree as constant
- Backlog
-
SERVER-81865 Use mkbson instead of project for simple top-level inclusion projections
- Closed
- is related to
-
SERVER-80240 Additions to Bonsai const folding
- Backlog
- related to
-
SERVER-80580 Microbenchmarks - investigate regression in inclusion projections on dotted paths
- Closed