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

Improve performance of the update path's $push sort

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Write Ops
    • None
    • Query Execution

    Description

      Currently the sort used for $push with $sort will extract sort keys in the sort comparator, once for each comparison. The key extraction is expensive and can be reduced by extracting prior to the sort.

      We should also consider adding optimization for insertion into an already sorted array.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            james.wahlin@mongodb.com James Wahlin
            Votes:
            4 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated: