Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variables in Grouped Queries
Message
 
To
09/03/2006 12:42:06
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01102741
Message ID:
01102893
Views:
20
Keith,

Thank you very much. This information is most helpful.

Chad

>Chad,
>
>It doesn't matter whether @date is added to the GROUP BY or not. The optimizer will ignore it because it is a constant. Whether to add an ORDER BY clause is difficult to answer without the specifics of table height/width, indexes, fill factor on clustered index, index fragmentation, etc. The best that you can do is examine execution plans and try changes to see if there are improvements.
>
>Assuming that this query will be executed a large number of times throughout the lifetime of the system, it is a good example of an item that a DBA will evaluate regularly and re-optimize to keep the performance high as the nature of the database and environment changes.
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform