Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9128

In place updates on documents containing indexed arrays slowing down exponentially with array size

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.2.3, 2.4.1
    • Component/s: Index Maintenance
    • None
    • Environment:
      OSx
    • ALL

      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

        1. weird_index_issue.js
          3 kB
          Marc Schwering

            Assignee:
            Unassigned Unassigned
            Reporter:
            marc.schwering Marc Schwering
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: