June 3, 2008 at 1:15 pm
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
June 3, 2008 at 1:21 pm
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
June 3, 2008 at 1:24 pm
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
June 3, 2008 at 1:26 pm
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
June 3, 2008 at 1:28 pm
you should check the indexes for fragmentation and also probably update the stats after the batch finishes.
* Noel
June 3, 2008 at 1:32 pm
Hi All,
Thanks for Prompt replay,
let me run some test with UPDATE stats today
Thank You
June 4, 2008 at 3:05 pm
I run sp_updatestates after each Batch but still same problem
June 4, 2008 at 3:21 pm
how about index rebuilds ?
* Noel
June 4, 2008 at 3:23 pm
we tried that too
June 4, 2008 at 3:23 pm
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