You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message="Implicit conversion due to mismatched data types. The column type does not match the parameter or literal type, forcing SQL Server to convert values at runtime. Fix the parameter type to match the column.",
363
-
Severity=PlanWarningSeverity.Warning
364
-
});
362
+
varreason=hasMismatch
363
+
?"Implicit conversion due to mismatched data types. The column type does not match the parameter or literal type, forcing SQL Server to convert values at runtime. Fix the parameter type to match the column."
364
+
:"Implicit conversion through CONVERT/CAST on a column. SQL Server must convert values at runtime, which can prevent index seeks. Remove the conversion or add a computed column.";
365
+
366
+
node.Warnings.Add(newPlanWarning
367
+
{
368
+
WarningType="Data Type Mismatch",
369
+
Message=reason,
370
+
Severity=PlanWarningSeverity.Warning
371
+
});
372
+
}
365
373
}
366
374
367
375
// Rule 14: Lazy Table Spool unfavorable rebind/rewind ratio
?$"{rewinds/rebinds:F1}x more rewinds (cache hits) than rebinds (cache misses)"
390
+
?$"{rewinds/rebinds:F1}x rewinds (cache hits) per rebind (cache miss)"
382
391
:"no rewinds (cache hits) at all";
383
392
384
393
node.Warnings.Add(newPlanWarning
385
394
{
386
395
WarningType="Lazy Spool Ineffective",
387
-
Message=$"Lazy spool has unfavorable rebind/rewind ratio ({source}): {rebinds:N0} rebinds, {rewinds:N0} rewinds — {ratio}. The spool cache is not providing significant benefit.",
396
+
Message=$"Lazy spool has low cache hit ratio ({source}): {rebinds:N0} rebinds, {rewinds:N0} rewinds — {ratio}. The spool cache is not earning its overhead.",
Message="Implicit conversion due to mismatched data types. The column type does not match the parameter or literal type, forcing SQL Server to convert values at runtime. Fix the parameter type to match the column.",
363
-
Severity=PlanWarningSeverity.Warning
364
-
});
362
+
varreason=hasMismatch
363
+
?"Implicit conversion due to mismatched data types. The column type does not match the parameter or literal type, forcing SQL Server to convert values at runtime. Fix the parameter type to match the column."
364
+
:"Implicit conversion through CONVERT/CAST on a column. SQL Server must convert values at runtime, which can prevent index seeks. Remove the conversion or add a computed column.";
365
+
366
+
node.Warnings.Add(newPlanWarning
367
+
{
368
+
WarningType="Data Type Mismatch",
369
+
Message=reason,
370
+
Severity=PlanWarningSeverity.Warning
371
+
});
372
+
}
365
373
}
366
374
367
375
// Rule 14: Lazy Table Spool unfavorable rebind/rewind ratio
?$"{rewinds/rebinds:F1}x more rewinds (cache hits) than rebinds (cache misses)"
390
+
?$"{rewinds/rebinds:F1}x rewinds (cache hits) per rebind (cache miss)"
382
391
:"no rewinds (cache hits) at all";
383
392
384
393
node.Warnings.Add(newPlanWarning
385
394
{
386
395
WarningType="Lazy Spool Ineffective",
387
-
Message=$"Lazy spool has unfavorable rebind/rewind ratio ({source}): {rebinds:N0} rebinds, {rewinds:N0} rewinds — {ratio}. The spool cache is not providing significant benefit.",
396
+
Message=$"Lazy spool has low cache hit ratio ({source}): {rebinds:N0} rebinds, {rewinds:N0} rewinds — {ratio}. The spool cache is not earning its overhead.",
0 commit comments