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 2012 - Dataflow startup in For Each Loop Expand / Collapse
Author
Message
Posted Tuesday, October 29, 2013 1:43 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 6, 2014 3:20 PM
Points: 4, Visits: 38
Hi, I have a package which will call two dataflows in a for each loop. The first dataflow will build a stage table joining data from source. the second will process all rows in the stage table loaded in the first dataflow. The SQL in each is simple and fast to run. (EG: the second dataflow is simply select * from stage).

On any given run the For Each Loop will loop 600- 800 times.

The problem I am having is that each time either of the dataflows runs in the loop there seems to be a 4-6 second delay before it reads data. Even in the second one where it is simply a select *. Combined this adds to about 8 seconds of delay (Validation maybe?) per loop instance. Therefore, I get only 3-4 loop instances run per minute. So my job can take 3 hours to run.

Is there any way I can eliminate this delay on reading in the Dataflows to cut my runtime to a fraction of what it is now?

Thanks
Post #1509554
Posted Tuesday, October 29, 2013 3:26 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 8:53 AM
Points: 43, Visits: 320
What is the ForEachLoop configured for? For each file, for each ado..?

~Sam.

http://svangasql.wordpress.com
Post #1509586
Posted Tuesday, October 29, 2013 3:37 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 6, 2014 3:20 PM
Points: 4, Visits: 38
Hi Sam,

the For Each Loop is configured for unique date in source. It will process records for each date starting from the earliest.

On any given day I can see 300-1200 dates.

For each date it will call the stage dataflow to assemble the data for that date. Then the Load data flow (using Stage) to check for possible changes to the target (type 2)

All source and Destination transforms in the dataflows are OLEDB.

The reason I am not doing one set based stage and load is that I need the updates from one date applied to the final target before processing the next date.

This way I can identify if the record has changes before updating (type 2) as I go through each date.
Post #1509592
Posted Tuesday, October 29, 2013 4:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 6, 2014 3:20 PM
Points: 4, Visits: 38
I should add. I have SQL to select all the unique dates for the For Each Loop and they are stored in a System Object variable. the For Each Loop will process For Each Ado Enumerator
Post #1509599
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse