SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS 2012 - Dataflow startup in For Each Loop


SSIS 2012 - Dataflow startup in For Each Loop

Author
Message
prologicconsulting
prologicconsulting
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
Sam Vanga
Sam Vanga
SSC-Enthusiastic
SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)

Group: General Forum Members
Points: 142 Visits: 502
What is the ForEachLoop configured for? For each file, for each ado..?

Sam Vanga
http://SamuelVanga.com
prologicconsulting
prologicconsulting
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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.
prologicconsulting
prologicconsulting
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search