What are statistics, under what circumstances they go out
of date, how do you update them?

Answers were Sorted based on User's Feedback



What are statistics, under what circumstances they go out of date, how do you update them?..

Answer / 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

What are statistics, under what circumstances they go out of date, how do you update them?..

Answer / koti

Statistics determine the selectivity of the indexes. If an
indexed column has unique values then the selectivity of
that index is more . Query optimizer uses these statistics
in determining whether to choose an index or not while
executing a query.

To update statistics there is command :

update_statistics

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More SQL Server Interview Questions

What is data compression?

0 Answers  


What is a partition key?

0 Answers  


what are default? Is there a column to which a default cant be bound?

1 Answers  


Is it possible we can connect our SQL database to GUI application? If it is yes than how tell me the explanation

2 Answers  


How to create an identity column?

0 Answers  






let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration

0 Answers  


Explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

0 Answers  


What is database white box testing?

0 Answers  


One table how may column and Primary key

3 Answers  


What is the difference between varchar and nvarchar datatypes?

0 Answers  


Can you please explain the difference between primary keys and foreign keys?

0 Answers  


How to provide default values to function parameters?

0 Answers  


Categories