[SERVER-10357] An update $push with sort is slower than expected Created: 26/Jul/13 Updated: 10/Dec/14 Resolved: 22/May/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Performance, Write Ops |
| Affects Version/s: | 2.5.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Andrew Emil (Inactive) | Assignee: | Andrew Emil (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | > db.brsort.drop() , ], } |
||||||||
| Participants: | |||||||||
| Description |
|
Seems like adding a $sort to a $push + $slice commands results in an unreasonably large slowdown. A slowdown is expected for large arrays, but it is surprising to see a 5x change when sorting an already sorted array of length 100. Note: I have only tested this on 2.5.0, dont have comparisons between versions Results from reproduction code using benchRun on various array sizes: Array length 1: Array length 10: Array length 100: Array length 1,000: Array length 10,000: Array length: 100,000: |