Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing for group by
Message
De
24/01/2011 20:46:32
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01497285
Message ID:
01497294
Vues:
40
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform