When i rebuild an updated stored procedure, the performance was very slow.
Is there an initial hit to performance when recreating stored procedures.
I would expect a hit when running for first time due to the execution plan not being in memory. Is there anything else that would contribute to performance hit.
The first question is "where is the delay"? Is it: invoking the procedure; executing the procedure; returning the result to the caller? Each will have different tuning requirements.
However two possible causes (working on the "what's changed" principle) are
- the SQL now uses inefficient access paths. Do normal SQL tuning
- you have new, poorly perfoming, SQL. Do normal SQL tuning