DEV Community

Discussion on: Bulk Insert in Dapper into MS SQL

Collapse
 
buinauskas profile image
Evaldas Buinauskas

850 records in 15 seconds is still really, really slow :)

Are your inserts complicated so that you need a stored procedure?

With a proper bulk insert you could do all of that in less than a second.

Thread Thread
 
zoltanhalasz profile image
Zoltan Halasz

Yes, I checked your suggestion with the proper SQL bulk insert. It now works, indeed around 1 second. I needed to convert the List to Datatable using the suggested method. Thank you! :)

Thread Thread
 
buinauskas profile image
Evaldas Buinauskas

There you go, way better than initial way you had it. Also tons of times faster.