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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Duplicate
    • 2.2.3, 2.4.1
    • None
    • Index Maintenance
    • None
    • OSx
    • ALL

    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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: