[SERVER-70655] Implement timeseries bounded sort optimization to use planning information instead of runtime information Created: 18/Oct/22  Updated: 09/Dec/23

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

Type: Improvement Priority: Major - P3
Reporter: Ivan Fefer Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

Currently timeseries bounded sort optimization is implemented after we already created an execution plan: https://github.com/mongodb/mongo/blob/6f450a3cea6287612329f44e90536d72fe7c16c5/src/mongo/db/pipeline/pipeline_d.cpp#L1225 

Because of this, to decide if we can do this optimization, we have to introspect PlanExecutorImpl and extract runtime information, such as sort order provided by the query, in a complex way, instead of using query planning interface, provided by QuerySolution.

This also makes the code fragile.
For example, implementing exclusion projection pushdown (SERVER-61284) breaks the code, because it doesn't support PROJECTION_* nodes as root of query execution tree.



 Comments   
Comment by Irina Yatsenko (Inactive) [ 09/Dec/23 ]

Removing from PM-3163 as the project's scope has changed to include last point optimization only.

Generated at Thu Feb 08 06:16:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.