[SERVER-13521] Allow fast $push to front of an array Created: 09/Apr/14 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Performance, Write Ops |
| Affects Version/s: | 2.6.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | performance, push | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Currently we seem to create reps for each element in the array even when we push to the front. If we can avoid that pushing to the front of an array will be much faster. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 08/Jul/14 ] |
|
xres74: Please see the documentation: http://docs.mongodb.org/manual/reference/operator/update/position/ or the linked issue ( This issues is about our internal code and performance, not a user facing feature. |
| Comment by Edward [ 08/Jul/14 ] |
|
Can someone please clarify this fix. Does this fix allow for $push to prepend elements to the front of the array? |