Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Is T-SQL MERGE command more performant than SSIS OLE DB Command transform?

$
0
0

Hi All,

I've explained that the SSIS OLE DB Command executes once for every row that needs to be updated, and that we'd be better off creating a stage table in the destination database, pushing all new and updated rows to that staging table, and then using a T-SQL MERGE stored procedure to "upsert" those rows.  Two others disagreed with me, stating that the MERGE statement also operates row-by-row.  I recall reading a few years ago that T-SQL MERGE is a set-based operation and that, for data warehouse projects, it is nearly always going to be the best choice for an upsert to the destination.  Could somebody please confirm?  They want it done yesterday, of course, but want me to test performance, too.  We've got 30 million rows for the initial insert, and I have no idea many changes (new rows and updated rows) are going on in production on a daily basis, but it's surely got to be in the thousands.  Isn't MERGE the obvious choice?

Thanks,
Eric B.



Viewing all articles
Browse latest Browse all 24688

Trending Articles



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