Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do you reindex DB?
Message
 
 
À
13/05/2021 16:56:43
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Indexation
Divers
Thread ID:
01680338
Message ID:
01680437
Vues:
18
>>Thank you. I will Google the WA_Statistics since I know nothing about it.
>
>Try this script :
>
>
>if object_ID('TempDB..#Stats') is not null
>   drop table #Stats
>
>create table #Stats (TableName varchar(128), Statistics_Name varchar(128), Statistics_Keys varchar(128))
>
>if object_ID('TempDB..#Stats_Temp') is not null
>   drop table #Stats_Temp
>
>create table #Stats_Temp (Statistics_Name varchar(128), Statistics_Keys varchar(128))
>
>exec sp_MSforeachtable 
>  'insert into #Stats_Temp execute sp_helpstats ''?'', ''ALL''','?','insert into #Stats select ''?'', * from #Stats_Temp','delete from #Stats_Temp'
>
>select * from #Stats where Statistics_Name like '_WA%'
>
Thank you. I will try it.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform