I have a program that loops through a temp table, and for each row looks up a value in another table, and depending on the result returned inserts a record into one of two tables. Some days this takes 10 minutes to run and others it takes 2 hours to run. There are no other processes running against the tables used so the problems seems to be within the program itself as far as deadlocking tables, etc. The entire loop is within a transaction. The question is how do I determine where the locking is occuring since the run time isn't always consistent?
May 13, 2009 1:52 PM
May 13, 2009 5:39 PM