Collection update writeConcern: { w: 0 } - MongoDB Slow Operations

Hi,

i’m see from MongoDB Atlas real time view that i have some slow update operations. The collection is indexed and does not have many rows. I’m thinking should i use
writeConcern: { w: 0 } parameter in update commend. I don’t even know would that help or not but where to put that in update-function?

Coll.update(filter, {$set: {…}}, {writeConcern: { w: 0 }}) is this correct?

Thanks!

Hi, did you analyze how many documents this update is examining?

I’m not sure how the writeConcern is going to help you in this case.

Think about the update as a “find” in the search part of the operation, maybe this is what is slowing your update down.