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

Rolling Up and Ranking Faster: Aggregate Transformation or SQL Procedure? Expand / Collapse
Author
Message
Posted Tuesday, December 16, 2008 7:10 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, July 06, 2012 9:12 AM
Points: 500, 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
Post #620385
Posted Tuesday, December 16, 2008 7:31 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, December 26, 2012 12:43 PM
Points: 1,330, 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
Post #620400
Posted Thursday, December 18, 2008 8:25 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, February 09, 2014 10:16 PM
Points: 265, Visits: 587
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



Post #622143
Posted Thursday, December 18, 2008 8:31 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, July 06, 2012 9:12 AM
Points: 500, 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
Post #622151
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse