Wasting CPU for implicit conversions in SQL Server

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.

By the way, this check is a part of our SQL Server Health Check service.

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.

Picture of Mark Varnas

Mark Varnas

Hey I'm Mark, one of the guys behind Red9. I make a living performance tuning SQL Servers and making them more stable. I channel my SQL into our SQL Managed Services, SQL Consulting and our internal database products.

Leave a Reply

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