March 24, 2014 at 5:32 am
Dear All,
I had a huge table (more than 160M rows) on SQL2005 EE, and decided to apply a partition scheme.
I've recreated all indexes (clust and non_clust) alligned with table partitioning.
1) if I decide to rebuild one index on a particular partition, does it automatically Update statistics for that index?
I have this question because i know that rebuilding indexes on all partitions triggers the update statistcs, but in this situation i'm not sure of that.
As far as i know index statistics refers to all rows of a table.
2) I've disabled auto_update_statistics: does it mean that i've to "take care" also of column stats that are auto created (_WA_sys_*) ?
Thanks in advance
March 24, 2014 at 6:04 am
Pl. find the extract from BOL:
"In SQL Server 2012, statistics are not created by scanning all the rows in the table when a partitioned index is created or rebuilt. Instead, the query optimizer uses the default sampling algorithm to generate statistics. To obtain statistics on partitioned indexes by scanning all the rows in the table, use CREATE STATISTICS or UPDATE STATISTICS with the FULLSCAN clause."
Keep in mind that update_statistics and Create_statistics are both different.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
March 24, 2014 at 9:16 am
Thanks free_mascot.
But
"In SQL Server 2012...
Is it true for SQL Server 2005?
And these statistics created by optimizer are some kind of "auto created" ( _WA_sys_ ) statistics?
If i try to run this query:
SELECT STATS_DATE(OBJECT_ID('my_table_name'),index_id)
it returns a "last update" for this index statistic that is older than my index rebuild date.
Am I missing something?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply