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.
| Author |
Topic |
|
niranjankumark
Posting Yak Master
164 Posts |
Posted - 2007-12-14 : 01:50:19
|
| HI,To update statistics for entire DB i have taken the script from under given link.But need to know the 1 : what is sample percent on update statistics2 : will it be applicable for 2005 ?script taken from : http://weblogs.sqlteam.com/tarad/archive/2006/08/14/11194.aspxkindly reply soon. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-12-14 : 02:36:20
|
I'm the author of that script. Yes it is applicable to 2005. Books Online information regarding sample percent:quote: SAMPLE number { PERCENT | ROWS } Specifies the percentage of the table or indexed view, or the number of rows to sample when collecting statistics for larger tables or views. number must be an integer, whether it is PERCENT or ROWS. To use the default sampling behavior for larger tables or views, use SAMPLE number with PERCENT or ROWS. The SQL Server 2005 Database Engine makes sure that a minimum number of values are sampled to guarantee useful statistics. If the PERCENT, ROWS, or number option causes too few rows to be sampled, the Database Engine automatically corrects the sampling based on the number of existing rows in the table or view. At least 1,000 data pages, approximately, are sampled. If the PERCENT, ROWS, or number option creates more values than are needed for a useful sample, the Database Engine tries to match the requested sample amount. However, because samples are taken by scanning all data pages, the actual sample size may not be exactly the same as the amount specified. When 0 PERCENT or ROWS is specified, the result is an empty statistics set.
Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
|
|
|
|
|