Thursday, March 22, 2012

_WA_SYS indexes

Hi,
What are the indexes's significance startign
with '_WA_SYS_*' present in sysindexes...How they are
created...?
How to omit them when we query to find the indexes that
our application is using...
Regards
Sridhar.Those are not indexes. This is statistics for a column, it is autogenerated.
Check the CREATE STATISTICS command in Books OnLine.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
<anonymous@.discussions.microsoft.com> wrote in message
news:9a1901c433f9$2923ecb0$a501280a@.phx.gbl...
> Hi,
>
> What are the indexes's significance startign
> with '_WA_SYS_*' present in sysindexes...How they are
> created...?
> How to omit them when we query to find the indexes that
> our application is using...
>
> Regards
> Sridhar.
>|||You can exclude statistics by filtering the IsStatistics INDEXPROPERTY:
SELECT name
FROM sysindexes
WHERE indid BETWEEN 1 AND 254 AND
INDEXPROPERTY(id, name, 'IsStatistics') = 0
Hope this helps.
Dan Guzman
SQL Server MVP
<anonymous@.discussions.microsoft.com> wrote in message
news:9a1901c433f9$2923ecb0$a501280a@.phx.gbl...
> Hi,
>
> What are the indexes's significance startign
> with '_WA_SYS_*' present in sysindexes...How they are
> created...?
> How to omit them when we query to find the indexes that
> our application is using...
>
> Regards
> Sridhar.
>sql

No comments:

Post a Comment