November 20, 2009 at 11:12 pm
Hi
What is STATISTICS in MS SQL ?
What is CREATE STATISTICS?
what is UPDATE STATISTICS?
DBCC SHOW_STATISTICS ?
SP_updatestats
With this how we can optimize our query or time consumption
SET STATISTICS PROFILE { ON | OFF }?
SET STATISTICS IO { ON | OFF }?
SET STATISTICS TIME { ON | OFF }?
pls help me in this.
Thanks
Thanks
Parthi
November 21, 2009 at 2:29 am
Firstly, statistics as controlled by Create/update/drop/ DBCC SHOW_STATISTICS are completely unrelated to SET STATISTICS XX. The first are column statistics used by the optimiser, the second shows query execution statistics.
Some links (that you could easily have found with Google)
CREATE STATISTICS - http://msdn.microsoft.com/en-us/library/ms188038%28SQL.90%29.aspx
UPDATE STATISTICS - http://msdn.microsoft.com/en-us/library/ms187348%28SQL.90%29.aspx
sp_updatestats - http://msdn.microsoft.com/en-us/library/ms173804%28SQL.90%29.aspx
DBCC SHOW_STATISTICS - http://msdn.microsoft.com/en-us/library/ms174384%28SQL.90%29.aspx
SET STATISTICS XX -
http://msdn.microsoft.com/en-us/library/ms190287%28SQL.90%29.aspx
http://msdn.microsoft.com/en-us/library/ms184361%28SQL.90%29.aspx
Finally, there's a whitepaper on how SQL uses statistics. Long, fairly deep but good - http://technet.microsoft.com/en-us/library/cc966419.aspx and I did a presentation on Statistics at the SQL PASS Summit couple weeks back. The deck's up on my blog. http://sqlinthewild.co.za/index.php/resources/
If you still have questions after reading through all that, some back and ask.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply