View Single Post

   
  #4 (permalink)  
Old 02-29-2008, 03:23 AM
Simon Hayes
 
Posts: n/a
Default Re: Auto created statistics and missing statistics


"Jesper Jensen" <moellemand@post.tdcadsl.dk> wrote in message
news:4072f91b$0$300$edfadb0f@dread12.news.tele.dk. ..
> Thanks, Simon, informative article, but ...
>
> ... it doesn't really explain the stuff, that I wrote. The closest I get

to
> an explanation, when reading this is 'These statistics are created for
> columns where the optimizer would have to estimate the approximate density
> or distribution otherwise'.
>
> I knew this, but I still do not know, why the optimizer needs to know the
> density and/or distribution?? I can see no valid reason, and therefore I

can
> see no good reason for enabling auto-creation of stats.
>
> What I probably looking for is a good example, where the use of an
> automatically created stat saves time, cycles and IOs
>
> Best Rgds - Jesper
>


OK, here's another informative article :-)

http://www.winnetmag.com/SQLServer/A...075/22075.html

In summary, index statistics exist only for the first column in an index,
but auto-created (or manually created) statistics can exist for any column.
This gives the optimizer extra information, which might mean it chooses a
different, more efficient index for a query.

Check out the example on the second page of the article - on my system, this
reduced the logical reads required for the query from 104 to 43.

But you're correct to consider that there can be an impact on performance in
some situations:

http://support.microsoft.com/default...b;en-us;195565

Simon


Reply With Quote