Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A different approach for optimization
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01595558
Message ID:
01595581
Views:
29
>>>Did you try having an index on the group by expression?
>>>
>>>Also, you do really need to convert to char? why not grouping by YEAR(Invoice.ModDate) directly? (and having an index on it too might help)
>>
>>In SQL Server you can not create an index on expression. Only if it's a computed column.
>
>Oh, yes, little detail I forgot... sorry Michel! But still you do not need the convert in my opinion, although I already proved I could be wrong!

Yes, no need to convert in the GROUP BY expression. I suspect there is a reason to convert in SELECT fields list.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform