-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Join-reordering is intended to be applied to top-level aggregation pipelines. This ticket is to confirm that an in-eligible top-level pipeline containing a $lookup with a subpipeline that itself is eligible for join re-ordering is not permitted to use join re-ordering.
It would not be ideal if the sub-pipeline used join re-ordering. That’s because the top-level $lookup would execute in document source land, where its subpipeline could get re-optimized potentially many times. We don’t want to incur the cost of using join optimization repeatedly.