[SERVER-9128] In place updates on documents containing indexed arrays slowing down exponentially with array size Created: 25/Mar/13  Updated: 30/Sep/13  Resolved: 02/Apr/13

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 2.2.3, 2.4.1
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Marc Schwering Assignee: Unassigned
Resolution: Duplicate Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSx


Attachments: File weird_index_issue.js    
Issue Links:
Duplicate
duplicates SERVER-8192 Optimize btree key generation Closed
Related
Operating System: ALL
Participants:

 Description   

The time needed to update documents containing an indexed array depending on the array size even if the array is not updated or an compound index is affected.

given a document like this:

{
  '_id' : "foo",
  an_indexed_field : 0,
  indexed_array : []
}

and indicies like this

db.foo.ensureIndex({"an_indexed_field" : 1})
db.foo.ensureIndex({"indexed_array.idx" : 1})

Updates (in place and non in place) of an_indexed_field depending on the size of the indexed array. (time for update growths exp)

Note/Workaround
Use old style v:0 indexes instead

see simple js example



 Comments   
Comment by Marc Schwering [ 25/Mar/13 ]

Added a short example js file showing the difference between v : 0 and v : 1 indexes

It might be related to: SERVER-8192

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