Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Update statics


Update statics

Author
Message
jitendra.padhiyar
jitendra.padhiyar
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 669
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
Arjun Sivadasan
Arjun Sivadasan
SSC-Addicted
SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)SSC-Addicted (454 reputation)

Group: General Forum Members
Points: 454 Visits: 976
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
jitendra.padhiyar
jitendra.padhiyar
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 669
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
Bhuvnesh
Bhuvnesh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2930 Visits: 4076
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----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Bhuvnesh
Bhuvnesh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2930 Visits: 4076
see this link too Statistics

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17641 Visits: 32268
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 Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
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