Friday, March 9, 2012

Group by performance

Hi !
I hope you can help me with next problem ... I've a query like this:
1. select <columnTable1, columnTable2>
2. from <3 joined tables>
3. group by <columnTable1, columnTable2>
The tables have 11500000, 1500000, and 10000 rows. When I prove 1 and 2
only, not problem, it runs very good. But when I execute it complete,
performance slows considerably.
What's your opinion? bad indexes? need I an "order by" clause? is it normal
slow performance?
Thanks in advance !No WHERE clause? Inner join? Outer join?
Information MAN. We need information!!!!!
Bob Castleman
DBA Poseur
"Han" <Han@.discussions.microsoft.com> wrote in message
news:9326EE5B-9255-4268-AE6C-E74FD7340C1C@.microsoft.com...
> Hi !
> I hope you can help me with next problem ... I've a query like this:
> 1. select <columnTable1, columnTable2>
> 2. from <3 joined tables>
> 3. group by <columnTable1, columnTable2>
> The tables have 11500000, 1500000, and 10000 rows. When I prove 1 and 2
> only, not problem, it runs very good. But when I execute it complete,
> performance slows considerably.
> What's your opinion? bad indexes? need I an "order by" clause? is it
> normal
> slow performance?
> Thanks in advance !
>|||Could you provide some more information on the schema and indexes employed?
Also, if you could flip on SET SHOWPLAN_TEXT so we could see a textual
execution plan we might see the problem.
"Han" wrote:

> Hi !
> I hope you can help me with next problem ... I've a query like this:
> 1. select <columnTable1, columnTable2>
> 2. from <3 joined tables>
> 3. group by <columnTable1, columnTable2>
> The tables have 11500000, 1500000, and 10000 rows. When I prove 1 and 2
> only, not problem, it runs very good. But when I execute it complete,
> performance slows considerably.
> What's your opinion? bad indexes? need I an "order by" clause? is it norma
l
> slow performance?
> Thanks in advance !
>

No comments:

Post a Comment