Thursday, March 29, 2012

drastic change in speed

I was executing sp, which was taking time. I then dropped it and recreated
it. It started executing very fast.
Can Anyone have idea why this happens and what exactly happen when we drop
and recreate sp.When you drop SP it will cause to recompilation ( generating a new execution
plan). The same thing you might achive by creating a stored procedure WITH
RECOMPILE option
For more details see BOL
"Vikram" <aa@.aa> wrote in message
news:%23QQDPBcQGHA.1676@.TK2MSFTNGP14.phx.gbl...
>I was executing sp, which was taking time. I then dropped it and recreated
> it. It started executing very fast.
> Can Anyone have idea why this happens and what exactly happen when we drop
> and recreate sp.
>|||Also, before recompiling all the stored procedures, look into running DBCC
UPDATEUSAGE for critical tables. This will incure that the new execution
plans are compiled using the latest usage statistics.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:euJAtBdQGHA.2012@.TK2MSFTNGP14.phx.gbl...
> When you drop SP it will cause to recompilation ( generating a new
> execution plan). The same thing you might achive by creating a stored
> procedure WITH RECOMPILE option
> For more details see BOL
>
>
> "Vikram" <aa@.aa> wrote in message
> news:%23QQDPBcQGHA.1676@.TK2MSFTNGP14.phx.gbl...
>

No comments:

Post a Comment