Improve Performance of Lookup Transformation

  • Hello

    I need to tune SSIS package.

    I use Lookup Transformation for Insert Vs Update Operation on Destination Table.

    Every night I ran ETL, From Source Query I got 740K records and I compare some key columns for Insert via Lookup transformation. If its No match then Insert to Destination table through OLE DB Destination else Update some defined column through OLE DB Command.

    I got perfect setup that meet the requirement but Problem is Performance.

    The Lookup takes a while to finish. Yesterday it took 25 Hours to finish so please help me to Improve Performance for lookup Transformation.

    Thanks

  • Insert all 740K into a staging table and then do a MERGE.


    Alex Suprun

  • Pushing the data to a staging table and applying all changes at once using MERGE is a good performing option.

    If you need to stick with Lookup for whatever reason, please post the configuration in the form or a screenshot or detailed posting.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • How did you determine the Lookup transformation is what slows you down? I believe the issue is the OLE DB Command transformation. Try loading the update rows into a staging table using the OLE DB Destination component with fast load. Then transfer the updates from staging to the destination table using the standard Execute SQL Task.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Hello

    I Attach Screen Shot

    Please Check it and let me know any thoughts

  • yogi123 (3/25/2013)


    Hello

    I Attach Screen Shot

    Please Check it and let me know any thoughts

    In my opinion, the lookup is unlikely to be the main culprit here. I'd be looking at the sorts and the OLEDB command - both notoriously slow and expensive. Can the sorts be done by the OLEDB source components? If so, get rid of the sort transforms.

    Get rid of the OLEDB command component by sending all the no match output rows to a work table and have a final ExecuteSQL MERGE which does the work in a set-based fashion.

    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.

  • Phil Parkin (3/25/2013)


    yogi123 (3/25/2013)


    Hello

    I Attach Screen Shot

    Please Check it and let me know any thoughts

    In my opinion, the lookup is unlikely to be the main culprit here. I'd be looking at the sorts and the OLEDB command - both notoriously slow and expensive. Can the sorts be done by the OLEDB source components? If so, get rid of the sort transforms.

    Get rid of the OLEDB command component by sending all the no match output rows to a work table and have a final ExecuteSQL MERGE which does the work in a set-based fashion.

    Oops, apologies - I seem to have almost directly quoted opc.three and Cozyroc.

    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.

  • Phil is right about the sorts. The way they're bring used they are a size-of-data operation and in most of the instances in your Data Flow you could have the OLE DB Source sort the data for you, and cheaply if you have an existing supporting index, if it is a SELECT-statement and you can add an ORDER BY.

    Have you timed the various pieces of the Package to see where the actual bottleneck is? If you;re thinking it is still the lookup please post the details of the configuration, maybe a screenshot of that.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 8 posts - 1 through 7 (of 7 total)

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