Hey...
Why do I sometimes experience low performance when I use a parameter instead
of an exact value?
For example the following performs very bad:
declare @TypeID integer
select @TypeID = 10
select ID from t_Table1 t1, t_Table2 t2 where
t_t1.ID = t_t2.FID and
t2.Type = @TypeID
but this query performs ok:
select ID from t_Table1 t1, t_Table2 t2 where
t_t1.ID = t_t2.FID and
t2.Type = 10
Jakob
Why do I sometimes experience low performance when I use a parameter instead
of an exact value?
For example the following performs very bad:
declare @TypeID integer
select @TypeID = 10
select ID from t_Table1 t1, t_Table2 t2 where
t_t1.ID = t_t2.FID and
t2.Type = @TypeID
but this query performs ok:
select ID from t_Table1 t1, t_Table2 t2 where
t_t1.ID = t_t2.FID and
t2.Type = 10
Jakob
Comment