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

Simplify plans for covered projections with expressions

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Query Execution

    Description

      Currently, SBE plan for query

      > db.c.createIndex({a:1, b: 1})
      > db.c.find({a: {$gt: 3}}, {_id: 0, a: 1, c: {$add: ["$a", "$b"]}}).explain()
      

      Will create an intermediate object, then extract values for fields a and b, compute expression and create final object. We can skip intermediate object and compute expressions directly using slots from index scan. Same strategy is applied for inclusion projections inĀ SERVER-54745.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            nikita.lapkov@mongodb.com Nikita Lapkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: