-
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
I have the following code below to seed a MongoDb instance of 500K+ objects
List<Member> members = new();
for (int i = 0; i < 500000; i++)
{
var data = $"{_random.Next()}";
members.Add(new Member()
{
Email = $"{data}@random.com",
});
}
_applicationMongoDbContext.Members.AddRange(members);
await _applicationMongoDbContext.SaveChangesAsync();
Creating the objects takes a few milliseconds but the await _applicationMongoDbContext.SaveChangesAsync() method takes around 20 minutes I checked my VPS and found out it seems to be only utilizing the first core
Metadata
Metadata
Assignees
Labels
No labels
