Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1963

mongoimport --mode=upsert doesn't do bulk upsert

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.11, 3.6.3
    • Component/s: mongoimport
    • None
    • Environment:
      linux

      bulk upsert is much faster than the current mode of inserting one at a time.

      if i'm not using upsert mode i can injest much faster using mongoimport.

      if i turn on upsert mode it goes much slower than it should.

      suggested fix: pull _id out of incoming documents and use that as the bulk upsert's selection portion.

      alternately enable a server side replace option that handles dup key error by replacing the doc in mongo instead of favoring what is already there. more like sql replace into rather than update/insert (because what i really want is replace into and i don't need fancy selectors to update documents on non-_id keys).

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            underrun Derek Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: