top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is the use of Update_Statistics in SQLServer

+2 votes
What is the use of Update_Statistics in SQLServer
posted Mar 17, 2014 by Neeraj Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

We add statistics on the columns that don't have statistics in order to boost query performance. UPDATE_STATISTICS Updates query optimization statistics on a table or indexed view. By default, the query optimizer already updates statistics as necessary to improve the query plan but in some cases you can improve query performance by using UPDATE_STATISTICS or the stored procedure sp_updatestats to update statistics more frequently than the default updates.

UPDATE_STATISTICS command is basically used when a large processing of data has occurred. If a large amount of deletions any modification or Bulk Copy into the tables has occurred, it has to update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly.

Here is T-SQL Command:
1. Updating All Statistics with sp_updatestats
EXEC sp_updatestats

  1. Update all statistics on a table

  2. Update the statistics for an index
    UPDATE STATISTICS TableName, IndexName

For more info please check Here

answer Mar 17, 2014 by anonymous
Similar Questions
+1 vote

I have created two list boxes.
listbox1 has single selection and listbox 2 has multi-selection and 3 text-boxes. I want to insert the selected items from both list-boxes as well as data entered from text-boxes at same time. I mean same statement insert using c#.

+4 votes

I have a requirement in which a column in the table should have distinct values but it may have multiple null values. How can I achieve that?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.