Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14926

Investigate changes in SERVER-56483: SBE explain output for ixscan/ixseek stage should indicate which index is being read

    XMLWordPrintableJSON

Details

    Description

      Downstream Change Summary

      This is a very minor change to the explain output for SBE execution plans specifically (i.e. does not affect the classic engine). For SBE ixscan stages, their output in explain now has an additional field, "indexName", indicating the name of the index that ixscan stage is reading. I'm unsure if we document the finest specifics of the explain output at this level, but flagging for attention just in case.

      Description of Linked Ticket

      When an SBE plan involves in ixscan or ixseek stage, the explain output associated with that stage looks something like this:

      				"stage" : "ixseek",
      				"planNodeId" : 1,
      				"nReturned" : 3,
      				"executionTimeMillisEstimate" : 0,
      				"advances" : 3,
      				"opens" : 1,
      				"closes" : 1,
      				"saveState" : 0,
      				"restoreState" : 0,
      				"isEOF" : 1,
      				"numReads" : 3,
      				"seeks" : 1,
      				"recordSlot" : 5,
      				"recordIdSlot" : 6,
      				"snapshotIdSlot" : 3,
      				"seekKeySlotLow" : 7,
      				"seekKeySlotHigh" : 8,
      				"outputSlots" : [ ],
      				"indexKeysToInclude" : "00000000000000000000000000000000"
      

      Notably absent from this output is any indication of what the index is. We should include the index name and/or key pattern. For comparison, here is what the output from the classic engine's IXSCAN stage looks like:

      			"stage" : "IXSCAN",
      			"nReturned" : 3,
      			"executionTimeMillisEstimate" : 0,
      			"works" : 4,
      			"advanced" : 3,
      			"needTime" : 0,
      			"needYield" : 0,
      			"saveState" : 0,
      			"restoreState" : 0,
      			"isEOF" : 1,
      			"keyPattern" : {
      				"a" : 1
      			},
      			"indexName" : "a_1",
      			"isMultiKey" : false,
      			"multiKeyPaths" : {
      				"a" : [ ]
      			},
      			"isUnique" : false,
      			"isSparse" : false,
      			"isPartial" : false,
      			"indexVersion" : 2,
      			"direction" : "forward",
      			"indexBounds" : {
      				"a" : [
      					"(0.0, inf.0]"
      				]
      			},
      			"keysExamined" : 3,
      			"seeks" : 1,
      			"dupsTested" : 0,
      			"dupsDropped" : 0
      

      We should consider adding the following information to SBE explain output for ixscan/ixseek as part of this ticket:

      • Index name
      • Index key pattern
      • Index version
      • Whether the index is multikey
      • The index's multikey paths
      • Whether the index is unique
      • Whether the index is sparse
      • Whether the index is partial

      Attachments

        Activity

          People

            Unassigned Unassigned
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              38 weeks, 6 days ago