-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
When working on SERVER-81387, we noticed that $lookup explain returns the sub-pipeline with views unresolved. This is because it captures the original, user-specified pipeline in a _userPipeline field and always returns that. This behavior is inconsistent with other stages such as $unionWith, which return the fully resolved and optimized sub-pipeline for explain. We should consider making it more consistent (allowing for better introspection).
It appears that we do report optimizations made to the lookup stage in explain output by manually adding on absorbed unwind and match info.
- is related to
-
SERVER-81387 Problem re-parsing pipeline with view definitions (for $queryStats)
- Closed
- related to
-
SERVER-96383 investigate adding better explain output for $lookup subpipeline
- Open