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

[CQF] Make sure computed fields are not redundantly pulled from storage

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization

    Description

      In the classic engine there is a bug in dependency tracking that can result in a suboptimal plan. If the query computes a field, and then depends on it later:

      {$addFields: {a: ...}} ... {$project: {a: 1}}
      

      then we redundantly pull 'a' from storage (the collection or an index).

      When we implement computed fields in Bonsai, we should make sure to test this case.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: