Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Statistics and an ALTER statement
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
00628999
Message ID:
00629172
Vues:
10
Do you know of a way to get a list of the statistics used against this table.field? There are about 10 that I need to drop before the ALTER statement will work.

I have tried using:
select * from sysindexes WHERE ID = OBJECT_ID(N'[dbo].[mytable]')
which returns all indexes and statistics on the table, but the only way I can see to filter down to statistics is when SUBSTRING(name, 1, 4) = 'hind'

The statistics all start with hind_##... Not really the 100% code I am looking for.


>I can think of no reason that you app would fail if you deleted the statistics. There could be a performance impact since the statistics were created by the optimizer when it felt that they were needed.
>
>I'm thinking that the optimizer will recreate the statistics although I haven't had an opportunity to test this.
>
>Check to see what sp_helpindex returns when given a statistic. If it gives you the columns involved, you could script a command to recreate the statistics.
>
>-Mike
Shawn Dorion
Geo Sektor Dot Com
Website: http://www.geosektor.com

Web Hosting Plans
Visit : http://WebHosting.Applications4u.com/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform