-1

Does Microsoft SQL Server 2008 create any statistics on its own? Or is it implemented in later versions? I know the way how can we create statistics, how query optimizer uses the statistics in query plan generation

migrated from stackoverflow.com Jul 20 '17 at 10:31

This question came from our site for professional and enthusiast programmers.

3

SQL Server creates index-level statistics (all versions. at least starting with 2000) on index creation (it also updates them when rebulding indexes)

SQL Server can also create column-level statistics (AUTO_CREATE_STATISTICS should be set to ON) when it needs them to elaborate execution plan.

Here the things change: these statistics are also created in versions < 2012, but only for read write databases. Starting with 2012 these column-level statistics can be created in tempdb if the database is readonly, and prior to 2012 it could't, so you could see a yellow triangle "missing column statistics" in your execution plan when executing in read only database. More on this here: SQL SERVER – Statistics for Read-Only Database are in TempDB

0

If Auto create statistics is true? -Yes, will create stats.

enter image description here

https://www.mssqltips.com/sqlservertip/2766/sql-server-auto-update-and-auto-create-statistics-options/

https://www.brentozar.com/blitz/auto-create-stats-disabled/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.