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

XMLWordPrintableJSON

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

      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:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Benjamin Murphy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: