SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Index rebuild on partition and update statistics


Index rebuild on partition and update statistics

Author
Message
NexusSQL
NexusSQL
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 354
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
free_mascot
free_mascot
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4069 Visits: 2235
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."
NexusSQL
NexusSQL
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 354
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?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search