[SERVER-64775] Profile perf of SBE $lookup with deep paths in foreign Created: 22/Mar/22  Updated: 29/Oct/23  Resolved: 13/Apr/22

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

Type: Task Priority: Major - P3
Reporter: Irina Yatsenko (Inactive) Assignee: Irina Yatsenko (Inactive)
Resolution: Fixed Votes: 0
Labels: sbe
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: QE 2022-04-18
Participants:
Linked BF Score: 135

 Description   

The currently proposed implementation creates a set of foreign key values per foreign document and then intersects it with a similar set created from a local document. While this is conceptually correct, we should investigate whether we could avoid creating the foreign set and instead probe for each foreign key value against the local set.

Because the set is per input document we are not too worried about the excessive memory usage, the main concern is CPU cycles. However, because the empty set of keys should be matched to null and it might require additional stages, probing can end up being as CPU-heavy as materializing the set.



 Comments   
Comment by Githook User [ 07/Apr/22 ]

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-64775 Do not materialize foreign key values into a set for NLJ
Branch: master
https://github.com/mongodb/mongo/commit/ba942d67259f686b00a82a7344ed396056cbeebb

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