Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 update statistics timing issue?

Author  Topic 

rubs_65
Posting Yak Master

144 Posts

Posted - 2009-02-05 : 16:32:34
Hi,

Update statistics with fullscan is taking less time than using sampling ratio. For example:

update statistics tabA WITH FULLSCAN, INDEX 12:50

update statistics tabA WITH SAMPLE 10 PERCENT, INDEX
9:02

update statistics tabA WITH SAMPLE 20 PERCENT, INDEX
13:49

update statistics tabA WITH SAMPLE 30 PERCENT, INDEX
17:59

update statistics tabA WITH SAMPLE 70 PERCENT, INDEX
37:14

TabA have 120M rows and 1 clustered and 2 non-clustered indexes. I ran the dbcc dbreindex with 95% sampling ratio before running the above test.

Is anyone else noticing this behavior and what can be the possible issue?

Thanks
--rubs

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-05 : 16:36:01
There is no need to update statistics if you have just Rebuild index with DBCC DBREINDEX.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-05 : 16:39:39
See this from Expert: Paul Randal.

http://sqlskills.com/blogs/paul/post/Search-Engine-QA-10-Rebuilding-Indexes-and-Updating-Statistics.aspx
Go to Top of Page

rubs_65
Posting Yak Master

144 Posts

Posted - 2009-02-05 : 16:41:36
I ran DBCC DBREINDEX for this test, but main question is on update statistics.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-05 : 16:59:05
You already did Update stats with Full Scan with Rebuild index.So there is nothing to update so it might be faster.
Go to Top of Page
   

- Advertisement -