Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: Query generation in batch insert scenarios

$
0
0

I have noticed that EF produces a large number of discrete insert statements when SaveChanges is called with a large number of new rows. It would be sensible here if instead of using individual INSERT INTO VALUE() statements a single INSERT INTO VALUES() statement was called.

In my test this has improved performance of regular SQL statements by a factor of about 8 or 9 and also performs much better in high latency scenarios. This is in-line with how SqlBulkCopy works in .net


Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>