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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.4.11, 3.6.3
    • Fix Version/s: None
    • Component/s: mongoimport
    • Labels:
      None
    • Environment:
      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

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

                Dates

                Created:
                Updated:
                Resolved: