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

SBE explain execution stats include both "nReturned" and "advanced", which duplicate each other

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v5.0
    • Sprint:
      Query Execution 2021-05-31

      Description

      When we display the full execution stats associated with an SBE plan in explain, each SBE stage reports both nReturned and advanced. For example:

      			"stage" : "nlj",
      			"planNodeId" : 1,
      			"nReturned" : 3,
      			"executionTimeMillisEstimate" : 0,
      			"advances" : 3,
      			"opens" : 1,
      			"closes" : 1,
      			"saveState" : 0,
      			"restoreState" : 0,
      			"isEOF" : 1,
      			"innerOpens" : 1,
      			"innerCloses" : 1,
      			"outerProjects" : [
      				NumberLong(4)
      			],
      			"outerCorrelated" : [
      				NumberLong(7),
      				NumberLong(8)
      			],
      

      This is a nested loop join stage. It has both nReturned and advanced which are both equal to 3. These two fields have the exact same meaning and report the exact same information. We should eliminate this redundancy. Since nReturned is a well-known field name from the format for explainVersion:"1", we should probably deleted advanced and keep reporting this statistic under the field name nReturned.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              irina.yatsenko Irina Yatsenko
              Reporter:
              david.storch David Storch
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: