[SERVER-57611] Simplify plans for covered projections with expressions Created: 10/Jun/21  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Nikita Lapkov (Inactive) Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: sbe-post-v1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-54745 Avoid creating intermediate object in... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

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.



 Comments   
Comment by Ethan Zhang (Inactive) [ 15/Jun/21 ]

ksuarz@gmail.com We assigned this to the feature gap project, feel free to reassign if that's not appropriate.

Generated at Thu Feb 08 05:42:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.