[SERVER-80561] Check perf impact of running in hybrid mode for re-written $group with $count Created: 30/Aug/23  Updated: 07/Oct/23  Resolved: 07/Oct/23

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

Type: Task Priority: Major - P3
Reporter: Irina Yatsenko (Inactive) Assignee: Backlog - Query Integration
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-80698 Implement $size aggregation expressio... Open
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Participants:

 Description   

The re-write of $count is using $size expression that isn't supported in SBE yet, so without special handling the pipeline will end up running in hybrid mode, with the buckets collection access in SBE and the re-written group in classic. We need to check whether this is negatively affecting perf, and if so, keep the whole pipeline in classic.



 Comments   
Comment by Irina Yatsenko (Inactive) [ 07/Oct/23 ]

I ran local queries against the tsbs_query dataset and for running in hybrid mode ($group with $size isn't lowered) independent of how many buckets are served up to the group, the hybrid mode is ~10-15% faster than fully classic. Thus, we are not going to block these pipelines from lowering to SBE.

Comment by Irina Yatsenko (Inactive) [ 29/Sep/23 ]

If $size is implemented in SBE (SERVER-80698), the pipeline will be lowered completely and we don't expect to have a perf hit in this case.

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