Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index become non optimized after a while
Message
 
 
À
07/07/2010 15:16:58
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01471721
Message ID:
01471729
Vues:
58
Could you post query execution plan for both cases?

<snip>

>Here is the command that is affected by the index when it becomes non optimized:
>
>
>DECLARE @NoMember Integer
>
>SET @NoMember=1
>
>SELECT Thread.Numero,Thread.Title,Thread.Url,Thread.AddDate
> FROM (SELECT TOP 10 Reply.NoThread FROM Reply (NOLOCK)
> WHERE Reply.NoMember=@NoMember ORDER BY 1 DESC) Temp
> INNER JOIN Thread ON Temp.NoThread=Thread.Numero 
>
>
>Right now, the result is:
>
>Duration: 1.7187 Count: 10
>
>When I index again, for a few hours after that, the result would be optimized such as:
>
>Duration: 0.0156 Count: 10
>
>The index that is affected is as follow and is at the end of the script just before the last index that is being built with the INCLUDE syntax:
>
>
>CREATE INDEX [IndexCombo1] ON [Reply] ([NoMember]) INCLUDE ([NoThread]) ON [Reply]
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform