The current implementation of Join copies the entire foreign collection document into the pipeline and then applies a projection to it in a subsequent stage.
We can generate better MQL using the new pipeline argument to $lookup that only copies the final projection results into the pipeline.
When the final result is smaller that the foreign collection document (which is usually the case) this will allow joining with a larger number of foreign documents before hitting the 16MB document limit in intermediate pipeline results.
- depends on
-
CSHARP-3310 LINQ3: Consider server version when translating a LINQ query
- Closed
- related to
-
CSHARP-5357 Generate more optimal MQL for GroupJoin using pipeline argument to $lookup
- Backlog