Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Index rebuild on partition and update statistics Expand / Collapse
Author
Message
Posted Monday, March 24, 2014 5:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Today @ 1:31 AM
Points: 2, Visits: 224
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
Post #1553972
Posted Monday, March 24, 2014 6:04 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 2:56 AM
Points: 2,603, Visits: 2,061
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."
Post #1553996
Posted Monday, March 24, 2014 9:16 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Today @ 1:31 AM
Points: 2, Visits: 224
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?
Post #1554088
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse