I’m going through the API reference for Mongocollection from the Java sync driver 4.11.1. I’ve noticed that in the definition of all the insertMany method variations, there’s this line
A call to this method is equivalent to a call to the
bulkWrite
method
So I wanted to understand why this is so? A googled a bit and the surface level answer seems to be that’s it’s more efficient. I wanted to understand a bit more in detail why bulkwrite() is being used here.
Thanks.
Link to API ref- MongoCollection (driver-sync 4.11.1 API)