Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variables in Grouped Queries
Message
 
À
09/03/2006 12:42:06
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01102741
Message ID:
01102893
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform