I have a source file of records ~100000, some of these records are in the db and some are new. What is the fastest way to check each document if it exists, update it if it does, or insert it if its new using MongoDb C# driver.
I have used FindOneAndUpdateAsync on each document but it is taking a long time. I cannot find a way of running multiple of these using the MongoDb driver. I would have to run these parallel in code async?