I have run into an issue that if I use the parameters passed into strored
procedure directly the performance is slower than when i declare local
variable and assign the values passed in the procedure to those local
variable and then use the local variables.
Why is this the case?
RahulRead this:
http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx#E6TAE
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Rahul" <reach_aggarwal@.hotmail.com> wrote in message
news:%23RXsRNbuHHA.1168@.TK2MSFTNGP02.phx.gbl...
>I have run into an issue that if I use the parameters passed into strored
>procedure directly the performance is slower than when i declare local
>variable and assign the values passed in the procedure to those local
>variable and then use the local variables.
> Why is this the case?
> Rahul
>
No comments:
Post a Comment