I created the table above:
CREATE TABLE TESTE (COLUNA1 NUMERIC(2,0) PRIMARY KEY)
I insert one row in this table:
INSET INTO TESTE VALUES (1);
And now I want return this row with statement SELECT:
SELECT * FROM TESTE WHERE COLUNA1=10
Look this Explain plan:
SELECT * FROM TESTE WHERE COLUNA1=10
|--Clustered Index
Scan(OBJECT:([MARTINI].[dbo].[TESTE].[PK__TESTE__5F9E293D]))
Why the explain plan use the function Convert?
And now I return this row with statement Select:
SELECT * FROM TESTE WHERE COLUNA1=10.
Look this Explain plain:
SELECT * FROM TESTE WHERE COLUNA1=10.
|--Clustered Index
Seek(OBJECT:([MARTINI].[dbo].[TESTE].[PK__TESTE__5F9E293D]),
Why this occur???
Why the second Select is quicker than first????
Thank you for help!!