Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Statistics and an ALTER statement
Message
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
00628999
Message ID:
00629172
Views:
17
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/
Previous
Reply
Map
View

Click here to load this message in the networking platform