Mongodb Bulkwrite operation having many replaceOne operations (performance impact)

75 views
Skip to first unread message

Soorya Prakash

unread,
Oct 23, 2017, 2:37:55 AM10/23/17
to mongodb-user
Hi,
 I am trying to update the documents using replaceOne operation with bulkwrite operation. Will there be a performance degradation using the replaceOne on a larger collection. Can any one please tell the performance impact of using the bulkwrite replaceOne operation.



Thanks,
Soorya

Kevin Adistambha

unread,
Oct 24, 2017, 8:38:50 PM10/24/17
to mongodb-user

Hi Soorya

Will there be a performance degradation using the replaceOne on a larger collection

Performance is a deep issue, and a lot of it are highly dependent on your use case, your deployment, the content of your collection, the update you’re performing, the size of the update, the size of your RAM, the speed of your disk, and many other factors specific to you. As to your question, I’m not certain I understand performance degradation of replaceOne as opposed to doing what?

Have you tried using bulk replaceOne and compare its relative performance against another alternative approach?

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages