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

How many types of Joins in SQL Server 2005?

9 Answers   CarrizalSoft Technologies, HCL,


What is an indexing strategy?

0 Answers  


What happens if null values are involved in comparison operations?

0 Answers  


How to declare and use cursor variables?

0 Answers  


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

0 Answers  






What are partitioned views and distributed partitioned views?

0 Answers  


What are the different sql server versions?

0 Answers  


What are the different authentication modes in sql server? How can it be changed?

0 Answers  


How many cores do I need for sql server 2016?

0 Answers  


what is the output for this query select * from employee where 1=1;

4 Answers  


What is the command used to check locks in microsoft sql server?

0 Answers  


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

0 Answers  


Categories