Hi, I've found that I can get massivly varying performance in a stored procedure depending upon whether a particualr select uses a parameter being passed in to the stored procedure or if it first copies it to a local variable and uses that. eg/ DECLARE PROCEDURE A @X AS BINARY(16) BEGIN SELECT ... FROM ... WHERE col = @X ...vs... DECLARE PROCEDURE A @p_X BINARY(16) BEGIN DECLARE @X BINARY(16) SET @X = @p_X SELECT ... FROM ... WHERE col = @X There's nothing obvious from the execution plans that would cause this but I'm seeing a difference in performance of about 400% between these two chunks of SQL. Depending upon whether I have an index on a second table JOINed in the SQL (but NOT keyed by the value being passed in) the effect can be reversed - it becomes quicker to use the parameter directly rather than copying it to the local variable. Anyone know why the use of the parameter or the use of a locally declared variable (of the same type) sould make such a significant difference in the execution time please? Note: This has only been observed with a BINARY(16). Thanks, Confused of Dudley, UK.