Improve performance of the update path's $push sort

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            James Wahlin
            Votes:
            4 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: