• UncleJimBob (8/31/2010)


    I ran into performance issues caused by parameter sniffing so many times using this type of construct

    at 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.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]