April 11, 2013 at 6:17 am
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
😎
April 11, 2013 at 7:27 am
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.
April 11, 2013 at 8:19 am
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
April 12, 2013 at 12:58 am
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.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply