Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server Newbies
»
Update statics
Update statics
Rate Topic
Display Mode
Topic Options
Author
Message
jitendra.padhiyar
jitendra.padhiyar
Posted Monday, January 07, 2013 11:36 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, April 18, 2013 3:09 AM
Points: 167,
Visits: 440
Hello Masters,
What exactly "Update static" is ? Is it just removing fragmentation from database that is created by DML queries? Is it making any changes to indexes ? and for all the updatation is it using Tempdb or any other database ?
Please explain in detail to understand me.
Thanks in advance.
Jitendra
Post #1403985
Arjun Sivadasan
Arjun Sivadasan
Posted Tuesday, January 08, 2013 12:33 AM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 09, 2013 3:29 AM
Points: 365,
Visits: 697
It is not static. UPDATE STATISTICS updates the statistics that SQL Server stores for a table.
define: Statistics - The practice or science of collecting and analyzing numerical data in large quantities.
Statistics help query optimizer to choose which index to use. SQL Server may store statistics for indexes or columns.
Try this: DBCC SHOW_STATISTICS(tablename, statisticobjname)
Statistics for a table is usually manually updated after a bulk insert operation because the statistics could have become stale. A bulk insertion should cause an auto update, but sometimes this takes time, causing bad performance.
Read more:
http://msdn.microsoft.com/en-us/library/ms174384.aspx
Post #1403999
jitendra.padhiyar
jitendra.padhiyar
Posted Tuesday, January 08, 2013 12:39 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, April 18, 2013 3:09 AM
Points: 167,
Visits: 440
Thanks a lot Arjun !
You explain me what exactly statisc is and what the sql server doing during update statics. Can you pls clear my more doubts?
1. Is it using indexing and sorting for this process ?
2. Is it using TempDB for data collection (for static purpose) ?
Thnx in advance,
Jitendra
Post #1404003
Bhuvnesh
Bhuvnesh
Posted Tuesday, January 08, 2013 12:46 AM
SSCrazy
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
jitendra.padhiyar (1/8/2013)
1. Is it using indexing and sorting for this process ?
2. Is it using TempDB for data collection (for static purpose) ?
NO.
Have you read the link which arjun posted ?
-------Bhuvnesh----------
While 1 = 1 (Learning SQL....)
Click to get fast response of your post
Post #1404005
Bhuvnesh
Bhuvnesh
Posted Tuesday, January 08, 2013 12:52 AM
SSCrazy
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
see this link too
Statistics
-------Bhuvnesh----------
While 1 = 1 (Learning SQL....)
Click to get fast response of your post
Post #1404007
Grant Fritchey
Grant Fritchey
Posted Wednesday, January 09, 2013 4:55 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 6:44 PM
Points: 13,381,
Visits: 25,173
jitendra.padhiyar (1/8/2013)
Thanks a lot Arjun !
You explain me what exactly statisc is and what the sql server doing during update statics. Can you pls clear my more doubts?
1. Is it using indexing and sorting for this process ?
2. Is it using TempDB for data collection (for static purpose) ?
Thnx in advance,
Jitendra
1. Statistics are a very small data set representing the selectivity/density and the histogram, or distribution, of the first column of the data defined by the statistic. This is true if it's on an index or just a set of statistics created automatically on a column referenced in a filtering clause in T-SQL code. It doesn't rearrange data, so no sorting is done. It does read the data, either in a sampled fashion, or by scanning the entire table for the column(s) defined by the statistic. Statistics are part of indexes, but they are separate from them.
2. Just about every process hits tempdb to one degree or another. I wouldn't be surprised if this one does too. But, again, the statistics are a very small data set, 200 rows, so updating them usually is not a major process unless we're talking hundreds of millions of rows of data.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #1404687
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.