Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81802

$lookup serializes unresolved sub-pipeline

    • 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.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            alyssa.clark@mongodb.com Alyssa Clark
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: