-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
ALL
-
QE 2026-06-22, QE 2026-07-06
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When a $lookup is using the index strategy, the index fetching code is doing the seek-deduplicate-fetch loop in the leaf node of the plan, but above this section there is a loop over all the possible search keys that belong to the same outer document. This loop performs a second deduplicate check to remove identical foreign documents matching different parts of the same local document. The result is correct, but we end up re-fetching documents that are later discarded.
Option 1: delay fetching, but this would imply delaying also the filtering and any manipulation done in the subpipeline representing the foreign stream
Option 2: switch to a more complex index scan representation that receives the entire set of search keys
- is caused by
-
SERVER-121730 Refactor SBE stage builder to reuse the conversion of index scans in index-based $lookup
-
- Closed
-