Bulk insert to MySQL in Entity-Framework core
I have a list of ~ 10,000 objects (say a class Person
) that I need to insert into a MySQL table. If I use a regular one DbContext.SaveChanges()
, it takes 60-70 seconds, which I have to cut sharply. I found several extensions for bulk inserts:
- EF extensions (not free, so no option)
- BulkExtensions (no MySQL, only SQL Server)
- EFBulkInsert (no MySQL, only SQL Server) ...
Unfortunately there is no MySQL database. Does anyone know of one for MySQL? If not, can anyone give me an approach for how I can make my own or adjust the above solutions? Thank!
+5
source to share
2 answers
0
source to share