[SERVER-63691] Optimize lookup of array elements in local when lowering $lookup into NLJ in SBE Created: 15/Feb/22  Updated: 29/Oct/23  Resolved: 21/Mar/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: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QE 2022-04-04
Participants:

 Description   

A naïve implementation would traverse the array for each record in the foreign table. This might or might not be a problem. Should measure and, if necessary, optimize it by repacking the array or keys into a set.



 Comments   
Comment by Irina Yatsenko (Inactive) [ 21/Mar/22 ]

The PR linked above fixed this, it was merged with https://github.com/mongodb/mongo/commit/ebb1f3900176b9df1f3c20646f349c9785914c43.

Comment by David Storch [ 21/Mar/22 ]

irina.yatsenko was there a commit against this ticket? I don't see a github link.

Comment by Irina Yatsenko (Inactive) [ 14/Mar/22 ]

This will likely be done as part of https://github.com/10gen/mongo/pull/3910 because we have to repack the traversed key values from a path anyway.

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