[SERVER-66511] Improve performance of blocking sort queries in SBE Created: 16/May/22  Updated: 29/Oct/23  Resolved: 27/Oct/22

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

Type: Task Priority: Major - P3
Reporter: Ethan Zhang (Inactive) Assignee: Alberto Massari
Resolution: Fixed Votes: 0
Labels: pm2697-m3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File classic100k.svg     File classic1k.svg     File classiccovered.svg     File classicmanyfieldsort.svg     File classicnoncovered.svg     File classicsort.svg     File sbe100k.svg     File sbe1k.svg     File sbecoveredblocking.svg     File sbemanyfieldsort.svg     File sbenoncovered.svg     File sbesort.svg    
Issue Links:
Depends
depends on SERVER-68903 Implement SORT_SIMPLE RID optimizatio... Closed
depends on SERVER-68432 Improve SBE plan for SORT->IXSCAN Closed
depends on SERVER-68471 Omit ProjectStage when possible in ma... Closed
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: QE 2022-09-19, QE 2022-10-03, QE 2022-10-17, QE 2022-10-31
Participants:
Linked BF Score: 35
Story Points: 15

 Description   

This is a known issue that pertains to sort implementation in SBE. The new plan cache cannot help here.

Relevant microbenchmarks:

  • Queries.NonCoveredBlockingSortWithIndexToSupportSort -19.74%
  • Queries.CoveredBlockingSort -23.30%


 Comments   
Comment by Githook User [ 27/Oct/22 ]

Author:

{'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}

Message: SERVER-66511 Use traverseP expressions to compute sort keys
Branch: master
https://github.com/mongodb/mongo/commit/0c8f1abefdc0f6c09b2ecebc17f7dd7a958f9148

Comment by Githook User [ 29/Sep/22 ]

Author:

{'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}

Message: SERVER-66511 Improve performances of sort+limit stages in SBE
Branch: master
https://github.com/mongodb/mongo/commit/19515cea589979e7243ccf101a375a3c63881a27

Comment by Githook User [ 26/Sep/22 ]

Author:

{'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}

Message: SERVER-66511: Add benchmark for sort+limit operations (#102)

SERVER-66511: Add benchmark for sort+limit operations
Branch: master
https://github.com/mongodb/mongo-perf/commit/541d79551a98db66d4ce5088b429f98d7a166e08

Comment by Kyle Suarez [ 07/Jul/22 ]

std::swap()ing this work to Eric so that Mihai works on the experimental ABT lowering/traverse work.

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