Missing Column Statistics

  • Hi,

    I've run a trace looking for SQL problems on one of my servers and have noticed a few problems. Generally obivous enough.

    But I'm getting one saying missing column stats.

    Auto update stats is on, and I'm unsure what I should do at this point.

    This is running on SQL2000 enterprise edition.

    Any suggustions would be appreciated.

    Thanks

  • Is Auto Create Statistics ON?

    Also, even if Auto create statistics is ON there are chances of missing statistics on a column if that column was never referenced in where clause of queries fired against that database.

    Manu

  • Sorry should have said that as well.

    Yes auto update stats and auto create stats are both on.

    So if I ran a query like so:

    select * from table1

    where column1 = x

    I would receive this message if any of the columns in the table had missing stats?

    And if this is the case, its nothing to be concerned about, as having the stats (on columns other than column1) would not improve the performance of the query anyway?

  • I just meant that statistics are automatically created on columns used in a predicate. Adding statistics improves query performance because the SQL Server query optimizer can better determine how to evaluate a query.

    In your case it might be because first time this type of query has been submitted to database engine. Also, having statistics on col1 will reduce the number of scans that sql server query engine has to make as its already having idea of data distribution in these column(with the help of statistics histogram).

    Experts please comment.

    Manu

  • thanks Manu

Viewing 5 posts - 1 through 4 (of 4 total)

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