DB2 upsert

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

DB2 upsert

Post by senthilt1 »

Hi All,

TO insert records into the table which method in DB2 is fast Either write mode or Upsert mode?

I have seen in a proj, used upsert mode but both the insert and update sql has the same insert query. so whats the diff b/w this upsert and write in this scenario?

Thanks

Senthil P
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Write mode is usually faster. With the "Upsert" method you need to specify both an update and an insert statement, even if you know that the second will never actually be executed, thus both statements can be identical.
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

Post by senthilt1 »

Thanks ArndW,

I got that write mode is faster but i couldnt get your second answer, since i am not a premium user.

Could you give me a hint on that one...

Thanks,
SenthilP
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Perhaps someone else might help; I believe that the price of membership is low copmared to the value received.
Post Reply