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

Simplify plans for covered projections with expressions

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution

      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.

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

              Created:
              Updated: