UncleJimBob (8/31/2010)
I ran into performance issues caused by parameter sniffing so many times using this type of constructat work that I had to stop using it.
TRACEFLAG 4136 will be your friend.
That or simply redeclaring local varaibles for each parameter and setting the local variable to the parameter.
either will get you around Microsoft's silly new Parameter sniffing feature that actually hurts performance more than it helps.