When do we use the UPDATE_STATISTICS command?
Answers were Sorted based on User's Feedback
Answer / guest
This command is basically used when we do a large processing
of data. If we do a large amount of deletions any
modification or Bulk Copy into the tables, we need to
basically update the indexes to take these changes into
account. UPDATE_STATISTICS updates the indexes on these
tables accordingly.
Is This Answer Correct ? | 34 Yes | 6 No |
Answer / sivakumar
That command is used to rebuild indexes on tables, which
can speed up queries. You might want want to do it whenever
a large amount of data has been deleted or added. It can be
complicated to determine whether it is more efficient to do
this, or to just let the statistics rebuild automatically
so, as usual, testing is called for in each individual case
to get optimal performance.
Is This Answer Correct ? | 7 Yes | 3 No |
Answer / nscom
There are three scenarios where you need to fire the update
statistics
1. Query execution times are slow.
2. Insert Operations Occur on Ascending or Descending Key
Columns
3. After Maintenance Operations - Operations that change the
*distribution of data" such as truncating a table or
performing a bulk insert of a large percentage of the rows.
More information is here
http://msdn.microsoft.com/en-us/library/ms190397.aspx#UpdateStatistics
Is This Answer Correct ? | 2 Yes | 0 No |
When we are using this query to shrink the log file,what exactly it will execute internally? Do we lose any data when we run this script? which data it will truncate in the log file and where it is saved. Please let me know... USE DatabaseName GO DBCC SHRINKFILE(<TransactionLogName>, 1) BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY DBCC SHRINKFILE(<TransactionLogName>, 1) GO
What will be the maximum number of index per table?
How to delete an attribute from the emp table
How to find related tables in sql server?
Do you know what are the steps to process a single select statement?
Can we take the full database backup in log shipping?
What is normalization 1nf 2nf 3nf?
Explain partitioned view?
How to create prepared statements using odbc_prepare()?
How to provide default values to function parameters?
What is Inner Join?
What is Left Outer Join?