all groups > sql server programming > august 2004 >
You're in the

sql server programming

group:

Stored Procedures slowing down



Stored Procedures slowing down Derek
8/30/2004 11:19:02 PM
sql server programming: I've been working on a stored procedure doing lots of little changes trying
to get that little bit more speed.

I've been making the change and then running the stored procedure twice, as
I understood that the first time it is slower as it needs to spend more time
"compiling it".

However I have found that the first time (after each change) is consistently
4-5 seconds faster then the second time. (Total time is around 1.5 minutes).

This seems contradictory to my understanding of how SQL Server stored
procedures work.

Any thoughts?
Re: Stored Procedures slowing down Uri Dimant
8/31/2004 9:29:30 AM
Derek
I'd run SQL Server Profiler to find out whether or not the execution plan is
in a cache after the first execution


[quoted text, click to view]

AddThis Social Bookmark Button