Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are statistics automatically updated when a new index is created?

Is there any benefit to running an UPDATE Statistics after you create an index or is it done automatically for you?

like image 228
Abe Miessler Avatar asked Dec 18 '09 21:12

Abe Miessler


2 Answers

If the new index needs new statistics they are automatically created, unless you explictly disable the statistics compute for the new index via CREATE INDEX ... WITH STATISTICS_NORECOMPUTE = ON

like image 116
Remus Rusanu Avatar answered Sep 28 '22 00:09

Remus Rusanu


Om 2005, at least, they are created automatically with CREATE INDEX:

http://technet.microsoft.com/en-us/library/cc966419.aspx#XSLTsection129121120120

like image 20
davek Avatar answered Sep 28 '22 00:09

davek