Batch Execution Time

  • Hi All,

    I have a unique problem

    When I run Batch Job on SQL server first time it runs fine but on subsequent execution of same batch it states taking more and more tine

    I run it 8 times and the time difference from 1st to 8th execution was almost 1hr

    When I reboot SQL services it runs in Normal time and same problem for subsequent batches

    Any Help will be appreciated

    Thanks

  • much more information needed

    like what is the batch doing

    It could be that your using up all your memory

    and when you reboot it clears the memory

    or tempdb space

  • It could also be that it is changing a lot of data and stats/fragmentation is getting worse and worse...

    The definition of what is the batch doing is critical to give you an answer.


    * Noel

  • Batch useses lots ot temp DB operation

    batch Delete/Insert data on eisting tables

    first it checks for exsitince or records if it exists it deletes that record and then Insert in to main table and it runs for about 30,000 records

  • you should check the indexes for fragmentation and also probably update the stats after the batch finishes.


    * Noel

  • Hi All,

    Thanks for Prompt replay,

    let me run some test with UPDATE stats today

    Thank You

  • I run sp_updatestates after each Batch but still same problem

  • how about index rebuilds ?


    * Noel

  • we tried that too

  • can you post what is that Batch doing ?


    * Noel

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply