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

Count clustered index scan as indexScan and not collectionScan in $lookup explain output

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution
    • ALL

      Based on this community post: https://www.mongodb.com/community/forums/t/clustered-collections-as-lookup-target/246893

      The user is worried we are not using clustered index, because in explain output for $lookup they see a lot of collectionScans and no indexes used.

      It happens because internally clustered index scan is a collection scan and not an index scan.

      We should improve explain output by showing explicitly that clustered index is used.

            Assignee:
            backlog-query-execution Backlog - Query Execution
            Reporter:
            tarun.gaur@mongodb.com Tarun Gaur (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: