May 2019
Intermediate to advanced
484 pages
11h 23m
English
Columns With No Statistics* happens when the Query Optimizer needs to load statistics on any given column that's relevant for the query, but none exist. If Auto-Create Statistics is disabled in the database, SQL Server cannot automatically create the missing statistics and this warning persists between executions.
The following example shows a query executed in the AdventureWorks sample database with a Columns With No Statistics warning:
USE [master]GOALTER DATABASE [AdventureWorks] SET AUTO_CREATE_STATISTICS OFFGOSELECT [CarrierTrackingNumber]FROM Sales.SalesOrderDetailWHERE [OrderQty] > 10ORDER BY OrderQty;GOALTER DATABASE [AdventureWorks] SET AUTO_CREATE_STATISTICS ONGO
In the generated execution plan, we can ...
Read now
Unlock full access