Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing for group by
Message
From
24/01/2011 20:46:32
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01497285
Message ID:
01497294
Views:
39
>Isn't this:
>
>
>CONVERT(char(8), Hit.AddDate, 112)
>
>
>the same as your expression
>
>
>CONVERT(CHAR(4),YEAR(Hit.AddDate))+REPLACE(STR(MONTH(Hit.AddDate),2),' ','0') + REPLACE(STR(DAY(Hit.AddDate),2),' ','0')
>
Yes, it generates the same result and at least four times faster. I am analyzing this now as to know if I can optimize more.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform