Do not waste CPU to process implicit conversions in the SQL Server

Category: Performance
Item: Implicit Conversion

What is SQL Server implicit conversion?

It occurs when SQL Server needs to convert the value of variables or columns to another data type for comparison.

Usually, when you mismatch data types in a WHERE clause or JOIN condition of the query.

Why should you care about them?

Your indexes will not be used efficiently.

You will waste CPU resources in the conversion process unnecessarily.

Which means that queries run slower.

How can I find them?

Figure out the slow queries of your server and review the execution plans found.

As you can see below, you can easily find the implicit conversions (implicit conversions WARNINGS) in the query plan.

Figure 1 – Implicit conversion warning int the query plan.

How to fix them?

Correct the SQL Server Implicit Conversions.

More information

SQL Server Implicit Conversions Performance , K. Brian Kelley – MSSQLTips Issues.

Mark Varnas

Mark Varnas

I love making performance tuning SQL Servers fast and making them more stable. And I channel that obsession into our SQL Managed Services and new content here. When I'm not writing about SQL, I spend time outside hiking, skiing, mountain biking, or trying a new recipe.

Leave a Reply

Your email address will not be published. Required fields are marked *