Thanks for all your suggestions - I have been trying out your
recommendations - but looks like blocking is not the issue here. I tried
running sp_who/ sp_who2 while the inserts seemed to have stuck (and was
taking a long time) - but there was no blocking.
I am wondering if it could be something to so with the network
connection or the database connection that my app. server makes with the
db server. Here's some more info on what exactly is happening:
In my app. I have 3 threads that could be inserting records in this same
table.
Thread 1: loop through 10000 times and insert records in TableA
Thread 2: loop through 5000 times and insert records in TableA
Thread 3: loop through 20000 times and insert records in TableA
All these 3 threads may be running simultaneously. And it often happens
that one of these threads get stuck while the other keeps writing. So
say for example Thread 1 is has written 1003 records; the 1004th record
may take almost 10-60 seconds. And thread2 keeps writing. Thread1
eventually starts again; but again gets stuck at some other number.
While this is happening, I have observed that once a particular thread
gets stuck - its always that thread that keeps having issues. While the
other threads keep going on. This leads me to suspect that it could be
the database connection. But am not sure how I can confirm this? Or if
this could be the case at all? Any ideas how I can go about
investigating this??
Thanks for all your help once again...
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!