May 2019
Intermediate to advanced
484 pages
11h 23m
English
PlanAffectingConvert* happens when the Query Optimizer encounters the need to convert data types, and the conversion operation affects the CE process or the ability to seek an existing index. Because conversions occur at runtime, and query optimization happens before execution, the Query Optimizer cannot account for such information during compilation. This is a direct result of the developers' choices, either at the query or database schema level, but can usually be remediated.
The following example shows a query executed in the AdventureWorks sample database with a conversion warning about CEs:
CREATE TABLE #tmpSales (SalesOrderID CHAR(10) PRIMARY KEY CLUSTERED);INSERT INTO #tmpSalesSELECT TOP 1000 SalesOrderID FROM ...
Read now
Unlock full access