ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What are statistics, under what circumstances they go out 
of date, how do you update them?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are statistics, under what circumstances they go out of date, how do you update them?
Answer
# 1
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 ?    1 Yes 0 No
Swapna
 
  Re: What are statistics, under what circumstances they go out of date, how do you update them?
Answer
# 2
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 ?    0 Yes 1 No
Koti
 
 
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
what is curser.  8
Can some one please help with a query which will take only max value of a column in a join.  2
What are explicit and implicit transactions?  2
how to find out the repeated value from table using groupby function?  3
What are functions  3
Can we call SP inside a query? Wipro4
How reterive duplicate value in SQL?  5
select the 3rd maximum salary from sql server database if 4 (just an example In practically I may not know the exact situation) of the highest salaries are equal.  7
What is de-normalization and when do you do it?  3
How to Display, Amount of Disk Activity Generated by Transact-SQL Statements?  1
How To Make password Protected SQL Server 2005 Database i.e when i open SQL Server database then ask for password.  1
How to select nth record from a table? DELL9
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?  2
Difference between server.transfer and server.execute method?  1
What are the magic tables in SQL Server 2000? Infogain5
What are Magic Table? Evalueserve15
How to retrieve data from log files in SQL SERVER ?????  1
i want to join two queries....and i want to run them as one after another that is want output of first query then second , then again output of first query then second and so on...  2
what is a cursor and what is its use?  1
how can we use a composite key for two tables and how can we represent it BoA1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com