Skip to Content
avatar image
Former Member

Create statistics

Hi.

I have a question about the use of 'create statistics':

What is most correct?

1. Create statistics on tables should be done regurarly (in a Maintenance plan). The optimizer is at its peak for making correct plans after create statistics on tables. Queries done by application will over time weaken the optimizers basis for choosing correct plan.

2. Create statistics on tables should only be done only when needed. The optimizer will gradually adapt to queries done by application so that the optimizer will have a better basis for choosing correct plan over time.

Regards,

Bjarne Anker

Maritech Systems

Norway

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 25, 2014 at 03:14 PM

    I would say number 2 is the most correct.

    From the docs:

    "In rare circumstances, when your database queries are very variable, and when data distribution is not uniform or the data is changing frequently, you can improve performance by executing the CREATE STATISTICS statement on a table or column."

    Also, you should read this (if you haven't already):

    Tip: Update Column Statistics

    --Jason

    Add comment
    10|10000 characters needed characters exceeded