Amicheals
Amicheals

Reputation: 147

Why would you use bulk insert over insert?

What is the difference between using insert and Bulk insert. I have looked for the answer on this but I cant get a straight answer.

Upvotes: 2

Views: 4760

Answers (2)

Dan Donoghue
Dan Donoghue

Reputation: 6216

Where did you look for the answer?

https://www.google.com.au/#q=sql+bulk+insert+vs+insert

First result has timings to back up the theory, other links are equally informative particularly some from MSDN.

There is also a bunch of helpful results from SO.

In short, Bulk insert is faster. You can use bulk insert to insert millions of rows from a csv or xml or other files in a very short time however if you only have 3 or 4 rows to insert it's quick enough to just throw it in using insert statements.

Upvotes: 1

Chris Steele
Chris Steele

Reputation: 1381

There is less logging in a bulk insert. This results in faster operation, typically. See this:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4347510a-fcb1-4050-a457-0b79c211b465/compare-bulk-insert-vs-insert?forum=transactsql

Upvotes: 1

Related Questions