Friday, March 9, 2012

Issue with Index for Temp Table

Hi,
I have created a SP which uses # temp table.
i created Index for this temp table. The issue is first time when i run the sp it is slow and if i run seccond time the same sp with the same range as previous one the speed increases drastically.
has anybody encountered same problem.
can u pls help

TIAThe most likely answer is that on the first call the server has to load all of the requested data from the hard drives. on the 2nd call the data is most likely in the data cache for SQL server, in the drive array controller cache or some combination of both.

There is all so a procedure cach. If the proc hasn't been run recently SQL Server might have to load the code from the hard drives, on the 2nd call the proc is probably still in the procedure cache.

No comments:

Post a Comment