What are statistics, under what circumstances they go out
of date, how do you update them?
Answer Posted / swapna
Statistics determine the selectivity of the indexes. If an
indexed column has unique values then the selectivity of
that index is more, as opposed to an index with non-unique
values. Query optimizer uses these indexes in determining
whether to choose an index or not while executing a query.
Some situations under which you should update statistics:
1) If there is significant change in the key values in the
index
2) If a large amount of data in an indexed column has been
added, changed, or removed (that is, if the distribution of
key values has changed), or the table has been truncated
using the TRUNCATE TABLE statement and then repopulated
3) Database is upgraded from a previous version
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is forward - only cursors / read only cursor?
What is log in sql server?
What are the different kinds of ssrs reports?
What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?
What is the difference between ddl and dml?
What is log cache in sql server?
what is the system function to get the current user's user id? : Sql server database administration
What is join query?
explain different types of constraints? : Sql server database administration
List out the different types of locks available in sql server?
Explain the functionalities that views support?
What is a primary index?
What xml support does the sql server extend?
What is a trace frag? Where do we use it?
What are the aggregate and scalar functions?