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

Template SortExecutor to be able to sort either WorkingSetMember or Document, improving agg sort perf

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.1
    • None
    • Querying
    • None
    • Fully Compatible
    • Query 2019-11-04, Query 2019-11-18
    • 0

    Description

      Performance tests show that it is faster to sort Document than to sort WorkingSetMember. The system is currently always sorting WorkingSetMember objects, even in the context of DocumentSource execution, where a WorkingSetMember must be created to contain the Document. We can optimize sorts that take place in the DocumentSource layer by sorting the Document objects directly.

      In the future, we could also use the templated SortExecutor in order to optimize the SortStage itself: for fetched data, it's likely faster to sort Document or even BSONObj in the PlanStage layer.

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: