-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
After SERVER-59501, mongos allows a top-level $lookup stage to be executed in parallel across shards when it thinks the foreign namespace is sharded. However, it seems mongos does not have the necessary information to determine whether or not a foreign view is sharded. In that case, the namespace is treated like an unsharded collection, and the $lookup isn't parallelized.
This ticket is to investigate if it is possible for mongos to determine that the namespace is a sharded view and to parallelize the top-level $lookup execution in that case.