View Single Post
  #5 (permalink)  
Old 05-28-03, 14:04
WizardOfGermany WizardOfGermany is offline
Registered User
 
Join Date: Apr 2003
Location: Trier, Germany
Posts: 28
Hi,

I am not sure for AIX, but on /390 and Windows there are no index locks anymore. And, smaller UOWs can degrade performance dramatically, because while commiting DB2 has to write the log data synchronous.

Quote:
Originally posted by ARWinner
You can still get deadlock while inserting into a single table (at least with V7.x). DB2 is locking more than just the rows being inserted. It also has index locks that are probably causing your situation.

My suggestion would be to have very small UOWs so that the locks are not held for any length of time. This means that your developers need to commit more often if possible. If this is not possible, maybe they should explictly put a table lock before inserting rows
(LOCK TABLE mytable IN EXCLUSIVE MODE). THis will prevent anyone else from accessing (reading or writing) the table while the UOW is active.

Andy
Reply With Quote