Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimization in this query
Message
De
18/02/2010 20:48:53
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01449844
Message ID:
01449848
Vues:
28
>What is the PK of the table?

Thread.Numero is the primary key.

>You may try
>
>select Thread.AddDate,Thread.Numero,Thread.Title,Thread.Url from Thread (NOLOCK) 
>inner join (select top (10) Numero from  Thread (NOLOCK)
>WHERE Thread.NoMember=@NoMember AND Thread.AddDate>@AddDate 
>ORDER BY Thread.Numero DESC) X on Thread. Numero = X.Numero -- Assuming Numero is a PK
Thanks, by doing this, I obtain the new execution plan. See attached. By interpreting that, does this mean this new execution plan is more optimized than the previous one?
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform