Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How often do you update statistics in SQL Server 2000?

I'm wondering if updating statistics has helped you before and how did you know to update them?

like image 730
Jon Avatar asked Dec 31 '22 10:12

Jon


1 Answers

exec sp_updatestats

Yes, updating statistics can be very helpful if you find that your queries are not performing as well as they should. This is evidenced by inspecting the query plan and noticing when, for example, table scans or index scans are being performed instead of index seeks. All of this assumes that you have set up your indexes correctly.

There is also the UPDATE STATISTICS command, but I've personally never used that.

like image 127
Ben Hoffstein Avatar answered Jan 10 '23 13:01

Ben Hoffstein