SSIS performance Insert Update and Delete

  • 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

    😎

  • 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.

  • 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

  • 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.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply