rpatil22
Ten Centuries
Points: 1371
More actions
October 15, 2009 at 8:57 am
#385586
What wrong or time consuming thing in this query ? GROUP BY UPPER(C3), UPPER(C4)?
NO OF ROW 500k+
Select
Max(C1),
Min(C2),
UPPER(C3),
UPPER(C4),
SUM(C5),
Max(C6),
Min(C7)
FROM table1
where C8 < 1 AND C3 IS NOT NULL
GROUP BY UPPER(C3),
UPPER(C4)
dbo.benyos
SSCommitted
Points: 1944
October 15, 2009 at 9:43 am
#1066356
It could be anything - from indexes to using the UPPER() function...
I'd start with removing the 'UPPER' function and see if it makes any big difference.
If not - look at the query plan and see what SQL is doing in the background.
Tal Ben Yosefwww.TalBenYosef.com(visit my LinkedIn profile)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply