En iyi yanıtlayıcılar
Is BULK INSERT faster than SSIS?

Soru
-
Quote from a recent forum thread: "On the processes i use now, im using SSIS (With the max tunning i can), but, even that way, bulk load by TSQL was extremely fast!...we load, every day, about 5~6 files with 10GB+- each, and SSIS is not fast enough (Remember: With max tunning, all options correctly...)..."
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/b322376d-7cbb-4e98-b7f8-c178505d4ede
Is BULK INSERT really faster than SSIS Data Flow? Sometimes? Always?
Kalman Toth SQL SERVER 2012 & BI TRAINING
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012- Düzenleyen Kalman Toth 6 Ekim 2012 Cumartesi 14:11
21 Mart 2012 Çarşamba 14:57
Yanıtlar
-
Hi, just adding an interesting article that compares the different load strategies for achieving high performance:
The Data Loading Performance Guide
David.
- Düzenleyen dac03 22 Mart 2012 Perşembe 18:30
- Yanıt Olarak Öneren Eileen Zhao 26 Mart 2012 Pazartesi 06:28
- Yanıt Olarak İşaretleyen Eileen Zhao 29 Mart 2012 Perşembe 01:52
22 Mart 2012 Perşembe 17:59
Tüm Yanıtlar
-
21 Mart 2012 Çarşamba 15:04
-
Arthur,
I am hard pressed to believe that BULK INSERT / bcp is faster than SSIS (any method). Yes, no, or maybe?
Even if BULK INSERT faster, is it production strength? I believe not.
Kalman Toth SQL SERVER & BI TRAINING
- Düzenleyen Kalman Toth 21 Mart 2012 Çarşamba 15:09
21 Mart 2012 Çarşamba 15:08 -
When a SSIS developer opted for using the "Fast Load" option along with the "Table lock" on the OLEDB target, or used the SQL Server Destination, then he/she has effectively used the very BULK INSERT, so this is a moot point to debate what is faster.
Bulk insert on its own has tricks, in SQL Server contest more can be done to make it faster a row process, namely making it minimally or not logging at all. Now disabling constraints is another thing the bcp takes care of, not SSIS (unless instructed), and this what MSFT can decide to change in SSIS, but where the SSIS shines is in using an algorithm figuring out what are the best parameters for a given machine/system to use (e.g. the buffer size, etc).
So in most applications the SSIS is faster right away and even more faster with proper tweaking.
In real life many factors bring different impacts to the benchmarking, but at this stage I am inclined to state there is no real measurable difference.
Arthur My Blog
21 Mart 2012 Çarşamba 15:17 -
Hi,
I'm not surprised bcp/BULK INSERT is faster than SSIS.
Both are launched directly from DB engine, so it has less code and translation layers in the middle.
bcp, BULK INSERT and SSIS are all production strength solutions, otherwise they wouldn't be running on international corporations.
Each one comes with its own pros and cons.
Sebastian Sajaroff Senior DBA Pharmacies Jean Coutu
21 Mart 2012 Çarşamba 15:20 -
Hi,
I'm not surprised bcp/BULK INSERT is faster than SSIS.
Both are launched directly from DB engine, so it has less code and translation layers in the middle.
bcp, BULK INSERT and SSIS are all production strength solutions, otherwise they wouldn't be running on international corporations.
Each one comes with its own pros and cons.
Sebastian Sajaroff Senior DBA Pharmacies Jean Coutu
The fast load option will use BULK INSERT statement instead of INSERT statement, so where is the speed gain coming from?Arthur My Blog
21 Mart 2012 Çarşamba 15:33 -
Quote from a recent forum thread: "On the processes i use now, im using SSIS (With the max tunning i can), but, even that way, bulk load by TSQL was extremely fast!...we load, every day, about 5~6 files with 10GB+- each, and SSIS is not fast enough (Remember: With max tunning, all options correctly...)..."
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/b322376d-7cbb-4e98-b7f8-c178505d4ede
Is BULK INSERT really faster than SSIS Data Flow? Sometimes? Always?
Kalman Toth SQL SERVER & BI TRAINING
The fastest method of insertion into SQL Server in SSIS uses BULK INSERT under the covers (see Destination Adapter Comparison for details) so its not surprising that a pure BULK INSERT would be quicker because it won't have all the other SSIS fluff running around it.ObjectStorageHelper<T> – A WinRT utility for Windows 8 | http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
- Yanıt Olarak Öneren Jamie Thomson 21 Mart 2012 Çarşamba 15:50
21 Mart 2012 Çarşamba 15:50 -
I am hard pressed to believe that BULK INSERT / bcp is faster than SSIS (any method).
Out of interest, why do you find that hard to believe Kalman?ObjectStorageHelper<T> – A WinRT utility for Windows 8 | http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
21 Mart 2012 Çarşamba 15:52 -
And I am curious what "all the other SSIS fluff running around it" is?
Arthur My Blog
21 Mart 2012 Çarşamba 17:46 -
And I am curious what "all the other SSIS fluff running around it" is?
Logging, a runtime engine, other concurrent tasks etc...
Arthur My Blog
ObjectStorageHelper<T> – A WinRT utility for Windows 8 | http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
21 Mart 2012 Çarşamba 18:16 -
And I am curious what "all the other SSIS fluff running around it" is?
Logging, a runtime engine, other concurrent tasks etc...
Arthur My Blog
ObjectStorageHelper<T> – A WinRT utility for Windows 8 | http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
21 Mart 2012 Çarşamba 18:16 -
bcp, BULK INSERT and SSIS are all production strength solutions,
What I was referring to that SSIS has optional extensive error logging and sophisticated error control.
T-SQL forum on a typical day has 5 or so my bcp not working (worked yesterday), my BULK INSERT not working and my linked server broken. For a regular database developer they appear pretty much like black boxes with some esoteric error messages such "did not find end of file marker" and so on.
Kalman Toth SQL SERVER & BI TRAINING
- Düzenleyen Kalman Toth 21 Mart 2012 Çarşamba 19:39
21 Mart 2012 Çarşamba 19:39 -
Hello,
Very interesting thread. Enjoyed reading it full of information.So the final conclusion is that Bulk Insert is faster right?
22 Mart 2012 Perşembe 05:24 -
I also don't find it hard to believe that a bcp/BI would be faster than SSIS - but this is a big "if":
- IF your incoming data is text
- IF your incoming text data is formatted exactly as your destination table is defined
- IF your incoming data requires NO semi-complex data conversions (only implicit)
- IF your incoming data has no fatally bad rows (alphas in numeric columns, etc)
- IF your incoming data has no ambiguities, interpretations, or lookups to do
Talk to me now on
22 Mart 2012 Perşembe 05:54 -
-
IF your incoming data has no fatally bad rows (alphas in numeric columns, etc)
... and missing end of row / file markers, hidden characters. These are pretty nasty errors with bcp / Bulk Insert. My favorite bcp error message is "unexpected end of file". Guaranteed to turn a database developer's productive day into ruins.
Kalman Toth SQL SERVER & BI TRAINING
- Düzenleyen Kalman Toth 22 Mart 2012 Perşembe 17:44
22 Mart 2012 Perşembe 17:30 -
Hi, just adding an interesting article that compares the different load strategies for achieving high performance:
The Data Loading Performance Guide
David.
- Düzenleyen dac03 22 Mart 2012 Perşembe 18:30
- Yanıt Olarak Öneren Eileen Zhao 26 Mart 2012 Pazartesi 06:28
- Yanıt Olarak İşaretleyen Eileen Zhao 29 Mart 2012 Perşembe 01:52
22 Mart 2012 Perşembe 17:59 -
When a SSIS developer opted for using the "Fast Load" option along with the "Table lock" on the OLEDB target, or used the SQL Server Destination, then he/she has effectively used the very BULK INSERT, so this is a moot point to debate what is faster.
Bulk insert on its own has tricks, in SQL Server contest more can be done to make it faster a row process, namely making it minimally or not logging at all. Now disabling constraints is another thing the bcp takes care of, not SSIS (unless instructed), and this what MSFT can decide to change in SSIS, but where the SSIS shines is in using an algorithm figuring out what are the best parameters for a given machine/system to use (e.g. the buffer size, etc).
So in most applications the SSIS is faster right away and even more faster with proper tweaking.
In real life many factors bring different impacts to the benchmarking, but at this stage I am inclined to state there is no real measurable difference.
Arthur My Blog
--Jeff Moden
28 Mart 2020 Cumartesi 06:45