已获得专家建议:
1. Tune your DB2 Server
Powerfull hardware is the simplest way to level up the performance. And try to tune your DB2 server configuration. A fine tuned DB2 server can achieve high throughput.
2. Using DB2 utility LOAD. (Best recommended)
The LOAD utility writes formatted pages directly into the database. You can turn off index statistic and constraint check, can utilize internal parallelism. etc..
So using LOAD will much faster than using SQL insert. About how to use LOAD, you can check DB2 Command Reference.
3. Using Static SQL application
Use SQLJ or other programming language to write a Store Procedure. Bind the plan and package. Just pass the variable to SP.
4. Using JDBC.
A question, is your Java app using one thread per connection to insert into DB2 table or all those threads share the same JDBC connection?
If one thread per connection. You'll encounter the Lock escalation on table if you don't issue the connection.commit() after executeBatch(). Other threads will be lock-wait.
Try to issue the SQL command " SET CURRENT DEGREE = ’ANY’ " and " SET CURRENT ISOLATION= UR " in the JDBC connection before you insert data.