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

Aggregation should use the output of DocumentSource::getOutputSorts() to optimize wherever possible.

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Query Optimization

      As part of SERVER-4507, a virtual method was introduced on DocumentSource, getOutputSorts, that allows the following stage to determine what, if any, sorting is present on the stream of input documents. At the moment, only $group takes advantage of this knowledge. Where possible, other stages should be expanded to take advantage of it as well. Of course, the primary example is $sort, which can do far less work if the input is already sorted by the sort key, but other possibilities may exist as well.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            benjamin.murphy Benjamin Murphy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: