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

In slotBasedPlan explain output, sort env slots by id

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 7.1.0-rc0
    • None
    • None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2023-08-21

    Description

      For example, here is a plan for index scan with multiple index bounds: 

                  slotBasedPlan: {
                    slots: `$$RESULT=s22 env: { s10 = Nothing, s2 = IndexBounds(...), s21 = true, s6 = {...} }`,
                    stages: '[2] nlj inner [] [s16, s17, s18, s19, s20] \n' +
                      '    left \n' +
                      '        [1] branch {s21} [s16, s17, s18, s19, s20] \n' +
                      '        [s1, s3, s4, s5, s6] [1] ixscan_generic ... \n' +
                      '        [s7, s13, s14, s15, s6] [1] nlj inner [] [s8, s9] \n' +
                               ...
                      '    right \n' +
                      '        [2] limit 1 \n' +
                      '        [2] seek s16 s22 s23 s17 s18 s19 s20 none none [] @"c0824ba7-b8ce-4efa-9475-e97061c16fae" true false \n'
                  } 

      There is an important branch on s21 in the plan. But it is hard to find the value of s21 in env, because it is not sorted by id. It is even harder in practice, as I have shorted some parts of the plan

       

      Attachments

        Activity

          People

            ivan.fefer@mongodb.com Ivan Fefer
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: