Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS performance Insert Update and Delete Expand / Collapse
Author
Message
Posted Thursday, April 11, 2013 6:17 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, December 18, 2014 1:23 AM
Points: 739, Visits: 848
This is a bit of a hybrid question between T-SQl and SSIS

I am looking at using CDC to load a data warehouse. Now with no warning of number of changes I am planning to make it as performant as possible.

I have one table with Insert / Update / Delete commands. I then plan to action these changes through SSIS. At first glance this seemed to be split the feed into three using conditional split and then to use OLE DB destination for the insert, 2 OLE DB command tasks (one for delete and one for insert). This is how MS have done it in one of their example packages.

Now I woukld like to challenge this. Surely the uuse of OLE DB command means the changes (updates and deletes) will be executed row by row?

Surely three Execute SQL TAsks would be better? Could they be faster than OLEDB Destination (Inserts), OLEDB Command (Update), OLEDB Command (Delete).

As this package will be used as a template I am sure I could make the Execute SQL task use a dynamic SQL statement.

Your thoughts much appreciated.

M
Post #1441204
Posted Thursday, April 11, 2013 7:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, December 8, 2014 6:20 AM
Points: 162, Visits: 723
I would keep all the insert/update/delete logic possible in a single stored procedure, and just have SSIS call the procedure. This minimizes the number of connections the package makes to the database.

Post #1441241
Posted Thursday, April 11, 2013 8:19 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, December 18, 2014 1:23 AM
Points: 739, Visits: 848
Had not thought of that. However that will require me writing 30+ stored Procedures as well as the packages. Experimenting with dynamic code inside the Execute Sql Task that may allow me to get away with a lot of code reuse.

Hoping to do it in SSIS rather than stored procedures.

Thanks
M
Post #1441275
Posted Friday, April 12, 2013 12:58 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:59 PM
Points: 5,317, Visits: 12,363
SSIS is extremely fast at INSERTs - I'd suggest leaving those to SSIS.

Updates and deletes I would direct to a staging area and then MERGE via a T-SQL stored proc.

I appreciate that you want to keep this in SSIS as much as possible, but I don't think you'll achieve your 'performant as possible' requirement that way.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #1441584
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse