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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 3.4.11, 3.6.3
    • None
    • mongoimport
    • None
    • linux

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: