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

$lookup serializes unresolved sub-pipeline

    XMLWordPrintableJSON

Details

    • Query Optimization

    Description

      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.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            alyssa.clark@mongodb.com Alyssa Clark
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: