users with documents containing a field status, what will be the result of this delete operation?db.users.deleteMany({ status: "inactive" })deleteMany removes all documents matching the filter.The deleteMany method deletes all documents matching the filter condition. Here, it deletes all users with status equal to "inactive" and returns the count of deleted documents.
db.orders.deleteMany({ status: "pending", amount: { $lt: 100 } })The filter specifies two conditions combined with AND: status must be "pending" AND amount must be less than 100. So only documents matching both are deleted.
Option B is invalid because the operator $gt must be inside an object: { price: { $gt: 50 } }. Option B is correct.
Deleting millions of documents at once can cause performance problems. Deleting in batches with limits reduces load and avoids long locks.
db.collection.deleteMany({})?db.collection.deleteMany({})An empty filter {} matches every document in the collection, so deleteMany({}) deletes all documents.
