I am very new to any type of tuning but have been learning more.. One of my specific databases one of the problems identified with slow queries are a number of Implicit conversions. It is my understand that when 2 non like column types are compared SQL Server has to convert one to the other, there is listing of priorities that tell it how to convert - Since the data type is converted, its possible that it will not use indexes correctly.. One of the first queries identified is a very basic one, and I would like to see if someone could help me identify what I'm seeing on my execution plan...
The basic query is:
( @1 TINYINT ,@2 VARCHAR(8000) ,@3 NUMERIC(4, 0) ) SELECT CONVERT([float], [low] / @3, 0) FROM [master].[dbo].[spt_values] WHERE [number] = @1 AND [type] = @2
The Execution plan shows:
Detail on the clustered index seek
spt_vaules.Type is Defined as nchar(3)
The Seek Predicates section is confusing me, exactly which part of this is it converting... My query says [low] is being converted from int to numeric but that doesn't seem to be what the cluster index seek details is showing, is it?
Is there a way to tell in this specific example how much "Better" it would be if I did the conversions Explicitly? I would think I could just do a "cast" in the query and insert a few numbers where the variables are, is that correct?