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

aggregation: optimize memory utilitzation by selective reification of documents

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.0-rc0
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:

      By analyzing the pipeline from back to front, if projections use inclusion, we can infer what fields we will need to evaluate the pipeline. If this is carried back to the beginning of the pipeline in a cumulative way (including indirect references in expressions), then we can get the complete set of fields that we need. Use this to limit the fields that are added to the reified documents at the head of the pipeline to reduce the amount of data passing through pipelines. May not be a significant change for pipelines that don't includes $sort or $group, but potentially a huge savings for those that do.

            mathias@mongodb.com Mathias Stearn
            dan@mongodb.com Daniel Pasette (Inactive)
            7 Vote for this issue
            9 Start watching this issue