[SERVER-75508] Optimize streaming $group Created: 30/Mar/23  Updated: 03/Feb/24

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

Type: Task Priority: Major - P3
Reporter: James Wahlin Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: qi-timeseries
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-70267 Streaming group when id is on time Closed
is related to SERVER-77574 Relax the sorting requirement for ena... Open
Assigned Teams:
Query Integration
Participants:

 Description   

We introduced streaming $group for time-series collections when $group _id is on time under SERVER-70267. We could take this further for the firstN accumulator by:

1) Short-cutting accumulation for a single _id value when N results are found

2) Extending this optimization when _id is null, short-cutting when N results are found

As part of this ticket we should also consider the following, and either include in scope or create new tickets for them if they make sense:

1) Allow this short cut mechanism for firstN outside of time-series when possible

2) Extend the time-series use case to lastN when/if possible (this would require a reverse scan)


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