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


Need help using the most efficient aggregation method in SQL Server 2008 R2 to sum up child rows in...


Need help using the most efficient aggregation method in SQL Server 2008 R2 to sum up child rows in same table

Author
Message
J Livingston SQL
J Livingston SQL
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12117 Visits: 37528
steve.pantazis (1/7/2013)
........ Long story short, we need to rewrite our aggregation routines, and it looks like you're pointing us in the right direction.


Steve

I would entirely agree with your comment and suggest you read and reread the article in question.

I am sure that you will be able to increase performance.

regards

ps....whilst the solution I provided may work...I wouldnt be looking to implement in production :-)...was only suggested to get the discussion going some more...both to help you and to assist my own learning.

________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day

steve.pantazis
steve.pantazis
Valued Member
Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)

Group: General Forum Members
Points: 64 Visits: 92
Yes, agreed. I have a steep learning curve ahead of me, but it's necessary. Thanks again for your contribution.
J Livingston SQL
J Livingston SQL
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12117 Visits: 37528
steve.pantazis (1/7/2013)
Yes, agreed. I have a steep learning curve ahead of me, but it's necessary. Thanks again for your contribution.


Steve

may be worth your while posting some "base data examples" here on the forum and see what the collective mindset comes back with......you never know :-)

________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day

steve.pantazis
steve.pantazis
Valued Member
Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)

Group: General Forum Members
Points: 64 Visits: 92
That sounds good. What I will do is work on the aggregation queries and then post my solution using a sample dataset. Then the community can analyze the solution and either use the methodology to help them, or offer a more optimized method.
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