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

Use RuntimeEnvironment for index key corruption checks

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • QE 2022-09-19
    • 5

      In SERVER-66437 the IndexScanStage was changed to allow lowKey and highKey slots to be inlined into the IndexScanStage as EExpressions. This essentially is an optimization for single interval index scan plans and enables us to eliminate the need for an nlj stage to feed in the lowKey/highKey slots. 

      The resulting plan is the following,

      nlj [s4, s6] []
                  left
                      [1] project [s4 = "_id_", s6 = {"_id" : 1}]
                      [1] limit 1
                      [1] coscan
                  right
                      [1] project [s3 = s8]
                      [1] ixseek KS(3C73686172644964656E74697479000104) KS(3C73686172644964656E7469747900FE04) s5 s7 s8 [] @"0f95d593-30f7-4386-9cb9-b5ce575e86cb" @"_id_" true

      There is no longer a need for slots s4 and s6 to be fed into the right branch of the nlj stage for the index key corruption check. The owner of this ticket should evaluate if we can use the runtime environment for s4 and s6 and eliminate the need for this whole nlj stage.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            eric.cox@mongodb.com Eric Cox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: