View previous topic :: View next topic
|
Author |
Message |
harijax
New User
Joined: 16 Jul 2008 Posts: 22 Location: Bangalore
|
|
|
|
Hi All,
As yoou all will be aware of a feathure in Db2 where we can insert or fetch multiple records in one Db2 call.
I have transaction table which contains around 164 columns. There is a very huge amount of insertion into this table from various applications (batch as well as online).
I have batch process as well which reads a big file, and for each record inserts into this table.
There will be 4-5 millions of new records every day.
My question is what will be the effect of Multi row insertion in these tables with respect to locking and commit frequency.
Is it advisable to go for multi row insert in such tables. Will it create any dead lock.
Regards,
Jayakrishnan |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hari,
By implementing multi-row insert, you can reduce a lot of I/O between your application program & DB2. Performance of the application will be improved.
Try, a count of inserting 500-1000 rows, commit frequency for the same.
Quote: |
Will it create any dead lock.
Unless appropriate locks already exist, one or more exclusive locks are
acquired at the execution of a successful insert operation. Until a commit or rollback operation releases the locks, only the application process that performed the insert can access the inserted row.The locks can also prevent other application processes from performing operations on the table. However, application processes that are running with uncommitted read can access locked pages and rows. |
Thank You,
Sushanth Bobby |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
I have transaction table which contains around 164 columns
...
There will be 4-5 millions of new records every day
|
well, convert a vsam record directly to a db2 row, ?????
164 columns inserted everyday 4-5 million times?
this requires a redesign. Hard to fix garbage design. |
|
Back to top |
|
|
|