[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:
Related
related to SERVER-9784 Reduce size of oplog entries for $pus... Closed
related to SERVER-2363 $push/$pushAll support for insertion ... Closed
is related to SERVER-13516 Array updates on documents with more ... Closed
is related to SERVER-12258 Repeated $push to end of an array is ... Closed
is related to SERVER-12547 Implement support for bulk rightward ... Closed
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 (SERVER-2363) on how to push to any position in the existing array (2.6 feature).

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?

Generated at Thu Feb 08 03:32:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.