SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Rebuild indexes and Update Statistics?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

NguyenL71
Posting Yak Master

USA
205 Posts

Posted - 04/23/2012 :  17:08:41  Show Profile  Reply with Quote
I want to clarify something, I usually scheduled maintenance job on a daily basis #1 but recently one of the developer in a company said when
you rebuild indexes, you need to update statistics with FULLSCAN otherwise, the fragementation still exist and the script he got from MS Tech Support to
update statistics with FULLScan.  I just want your opinions which one is the correct to use.  I am not always 100% believe in MS Tech Support.
As I read through many articles before, they even said you don't need to run update statistics after you rebuild indexes.  SQL2005/2008.


Definition of FULLSCAN:
FULLSCAN: option is used to specify all the rows in a table should be retrived to generate the key distribution statistics.

Ex:

--1 ( daily)

ALTER INDEX ALL ON T1 REBUILD;
UPDATE STATISTICS T1 WITH ALL;
go


--2 (Weekly)

UPDATE STATISTICS T1 WITH FULLSCAN;
go

yosiasz
Flowing Fount of Yak Knowledge

USA
1629 Posts

Posted - 04/23/2012 :  17:39:32  Show Profile  Click to see yosiasz's MSN Messenger address  Reply with Quote
read this up

http://www.sqlskills.com/BLOGS/KIMBERLY/post/Disk-space-is-cheap.aspx

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000