Skip to content Skip to sidebar Skip to footer

Inserting Bulk Data In Sql: Oledb Irowsetfastload Vs. Ado.net Sqlbulkcopy

I am evaluating different methods for inserting large amount of data in SQL server. I've found SqlBulkCopy class from Ado.Net and IRowsetFastLoad interface from OLEDB. As far as I

Solution 1:

SqlBulkCopy is the managed equivalent of IRowsetFastLoad, they should perform similarly. In the client, as a general rule, OleDB is faster than ADO.Net due to the availability of bindings, which allow for a faster transfer of data in and out the API (less memcopy required because the buffers are known ahead, fixed and pre-allocated). ADO.Net gives a much easier programming model, but is not possible to get data out of ADO.Net w/o a copy. But for all but the most critical access, the difference should be impossible to measure.

Where it comes to the difference that matters, the server access, they both will use the fast load INSERT BULK API (not available from straight T-SQL) and that what really matters.

Post a Comment for "Inserting Bulk Data In Sql: Oledb Irowsetfastload Vs. Ado.net Sqlbulkcopy"