Waht is these _WA objects in sysindexes

  • Query system table sysindexes using

    select name,indid,rows from sysindexes where name like '_WA%'

    displays lots rows. These are not created by users, does not look like indexes as they have now rows.

    In SQL 2005 Management Studio, these _WA objects are listed for some tables under Statistics.

    What are they and what are they for?

    Thanks

    Gang

  • They are column statistics created by SQL when it filters or joins on a column that doesn't have an index or existing stats.

    They're there to tell the optimiser aproximatly how many rows to expect for any query, so that it can produce an optimal plan.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply