Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002

    Unanswered: Issue with Index for Temp Table

    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


  2. #2
    Join Date
    Feb 2002
    Houston, TX
    The 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.
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts