> I have an application working on Oracle (8, 9) that needs porting to
> DB2 V7.2.4 on AIX for another customer. There are 40 million records
> (+ detail tables) that we are working with.
> The application consolidates data into one table, i.e. there are
> statements like "insert into <the one table "A"> (...) select from ...
> with UR". For performance reasons multiple processes run at the same
> time writing to the same table "A" - but with definitely different
> ids. Also there is no index on table "A" since it would cost more to
> maintain than to do some rare table scans. These processes insert from
> 10.000 to 2.000.000 records into table "A". The processes are written
> in Java, they call the insert statement via JDBC with autocommit off.
> Ok, this was the introduction. From time to time the database
> processes run into an error:
> COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0911N
> The current transaction has been rolled back because of a deadlock or
> timeout. Reason code "2". SQLSTATE=40001
> Reason code "2" is a deadlock. Does anyone have an idea how to get
> around this? Oracle can handle this without problems, since there is
> no obvious need to lock records on table "A". B.t.w.: the database in
> in row level locking mode (unless escalation happens).