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

cmdObj isn't needed for runAggregate if no cursor is opened

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • Fully Compatible

      When running an aggregation pipeline over a view, we build the new AggregateCommandRequest with the resolved view and the original user-provided request. We then serialize the AggregateCommandRequest into a BSON cmdObj (here). In the IDHack path, this serialization takes somewhere around 1-2% of the query time, but the resulting cmdObj isn't actually necessary until a cursor is opened. We can avoid this time spent serializing if the results fit in one batch.

            Assignee:
            santiago.roche@mongodb.com Santiago Roche
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: