why are my statistics still stale?

  • I am trying to understand why are my stats still stale, below are the steps involved in the process:

    i) Disable all indices (clustered and non-clustered)

    ii) Load all the data , it literally copying all the records from one table to the another table (db where all the indices are disabled)

    iii) After loading the data, enabled all indices including cluster and non-cluster.

    iv)Took litespeed backup ,copied the backup file to another server and restored on another server.

    I would assume since i re-enabled the indices ,stats should also have been updated. In my case stats were still stale, my query was using completely different plan after updating the stats query was back to normal and was using the right execution plan.

    Any thoughts on what could be causing this?

  • curious_sqldba (10/5/2013)


    I am trying to understand why are my stats still stale, below are the steps involved in the process:

    i) Disable all indices (clustered and non-clustered)

    ii) Load all the data , it literally copying all the records from one table to the another table (db where all the indices are disabled)

    iii) After loading the data, enabled all indices including cluster and non-cluster.

    iv)Took litespeed backup ,copied the backup file to another server and restored on another server.

    I would assume since i re-enabled the indices ,stats should also have been updated. In my case stats were still stale, my query was using completely different plan after updating the stats query was back to normal and was using the right execution plan.

    Any thoughts on what could be causing this?

    Please ignore this, i just came to knew that all the PK's were not disabled.

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

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