Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Rolling Up and Ranking Faster: Aggregate Transformation or SQL Procedure?


Rolling Up and Ranking Faster: Aggregate Transformation or SQL Procedure?

Author
Message
omhoge
omhoge
Mr or Mrs. 500
Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)

Group: General Forum Members
Points: 578 Visits: 183
Hey Gang,

I have to do a host of roll ups on sales fact data.

In SSIS which have you found to faster/better: the
Aggregate Transformation or a SQL stored procedure?

There are also a lot of Sales Ranks we need to calculate.

So far it seems SQL might be the only way [SELECT ROW_NUMBER() OVER (PARTITION BY Date_ID ORDER BY Sales_Qty desc) AS Rank ...]
If there's better way with a SSIS transformation, that would be
a great help too.

[sorry if this is a repeat, did search forum but didn't find.]

Skål - jh
Hari.Sharma
Hari.Sharma
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1392 Visits: 455
Hi,

I would personally suggest you not depend on SSIS to accomplish this work. What you can do is add all stuff in Stored Procedure (keep Best Practice cases in mind) and call it in SSIS Execute SQL Task . Not only will this perform much better, it will also likely be less painful to develop.

However, you can do all this in SSIS also but Transformation may take too long if you have high volume of data.

Cheers,
Hari
Tips & Tricks for SQL BI Developers

stricknyn
stricknyn
Old Hand
Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)

Group: General Forum Members
Points: 346 Visits: 685
Hi,

I usually use this as my rule of thumb... If the data needs to be grouped/aggregated only one time i'll do all the work in a stored procedure. But if I need to pull data and group/aggregate it multiple times and/or different ways, I'll do 1 pull to get all the data and do all the aggregations I need and created all the outputs I need. With doing it all in SSIS I don't have to keep going back to the server for pulls.

SSIS rules when it comes to working with the data once it's in it buffer. SQL server rules when it comes to querying pulling data. So you have to use that to your advantage when deciding which route to go.

Hope that helps!

Strick



omhoge
omhoge
Mr or Mrs. 500
Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)

Group: General Forum Members
Points: 578 Visits: 183
Great Thanks all!
All good points.
Yes the data volumn is pretty big and it's been getting slow with just SSIS, I appreciate the sanity check on the Aggregate Transformation.

Skål - jh
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