[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Statistics - Catalog Information on SQL2000

Peter Shin

3/9/2007 4:47:00 AM

Hi

I'm looking for some catalog tables/views in SQL2000 that will give me
information about my user-created statistics.

I managed to get some information from sysindexes where (status & 64) > 0 so
I can join with sysobjects and get the stats for a given table. However
there are no entries on sysindexkeys for the columns referenced by the
statistics, so I can't get a list of stats for a given table+column.

Does anyone know where is this info stored?

Thanks in advance,
Peter


2 Answers

Adi Cohn

3/9/2007 5:46:00 AM

0

On Mar 9, 6:47 am, "Peter Shin" <peters...@truclsd.com> wrote:
> Hi
>
> I'm looking for some catalog tables/views in SQL2000 that will give me
> information about my user-created statistics.
>
> I managed to get some information from sysindexes where (status & 64) > 0 so
> I can join with sysobjects and get the stats for a given table. However
> there are no entries on sysindexkeys for the columns referenced by the
> statistics, so I can't get a list of stats for a given table+column.
>
> Does anyone know where is this info stored?
>
> Thanks in advance,
> Peter

I think that what you are looking for is the stored procedure
sp_helpstats. You can read about it at BOL.

Adi

Alejandro Mesa

3/9/2007 2:53:00 PM

0

Also use "DBCC SHOW_STATISTICS".


AMB

"Adi" wrote:

> On Mar 9, 6:47 am, "Peter Shin" <peters...@truclsd.com> wrote:
> > Hi
> >
> > I'm looking for some catalog tables/views in SQL2000 that will give me
> > information about my user-created statistics.
> >
> > I managed to get some information from sysindexes where (status & 64) > 0 so
> > I can join with sysobjects and get the stats for a given table. However
> > there are no entries on sysindexkeys for the columns referenced by the
> > statistics, so I can't get a list of stats for a given table+column.
> >
> > Does anyone know where is this info stored?
> >
> > Thanks in advance,
> > Peter
>
> I think that what you are looking for is the stored procedure
> sp_helpstats. You can read about it at BOL.
>
> Adi
>
>