INSERTing maximum value

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

RakshaPai
Participant
Posts: 35
Joined: Fri Jun 15, 2007 11:21 pm

Post by RakshaPai »

There are no issues with the availablity of the database.

What i am wondering is - selecting max from the same table and inserting into the same table, would it create a dead lock due to locking issues on the table?
i am not sure if SELECT MAX is going to have a EXCLUSIVE lock on the table. in that case there would be a deadlock during the insert.

i don know if i m correct here.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You are doing a normal lookup. The query will finish in the LUT_Create operation, and release any lock it may hold. The table will be updated downstream of the LUT_Process operation. There will be no lock issues from this quarter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
RakshaPai
Participant
Posts: 35
Joined: Fri Jun 15, 2007 11:21 pm

Post by RakshaPai »

ok.. that sounds good.. :)

will do it in a single job then :D

thanks for all ur inputs guys....
Post Reply