I’m looking to execute an update query in a Production Mongo DB. Version 3.0.14. DB cluster with Primary and 4 Replicas with i3.2xlarge.
There are 2.2 M records to be updated. Can this have a considerable performer impact on the DB instances .
Following are the indexes.
"Type" : 1.0,
"app" : 1.0,
"event" : 1.0,
"createdAt" : -1.0
This is a similar sample query
db.getCollection('<collection name>').update(
{"Type" : "<Type>",
"app" : "<App>",
"event" : "<testEvent>",
$and:[{"createdAt":{$gte: ISODate("2020-10-26T00:00:00.000Z")}},
{"createdAt":{$lte: ISODate("2020-12-26T00:00:00.000Z")}}]},
{$set:{"isRead" : true}},
{multi:true}
)