Update query hanging while running in parallel

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

harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Update query hanging while running in parallel

Post by harshada »

I am running a update query in oracle stage. The query is something like this
update A
set b=orchestrate.c,
d=orchestrate.e
This is supposed to update aroung one miilion record. The table A has around 10m records.
Now the job is configure to run in four parallel nodes. When it is running 4 nodes it went on for 2 days without updating a single row. When I checked the orcale database table A is locked by 4 processes, which I was expecting. Now when I recofigure the .apt file to run the job in 2 nodes it got finished in 3 mins. Is it because the four processes are locking the table simultaneously, it was not updating. If this is true how it has worked with 2 processes. I am bit confused. Can someone explain how exactly update statement works in parallel job.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... no where clause? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Post by harshada »

Sorry..yes there was a where clause like this where x=orchestrate.z
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What partitioning are you using? Would level of locks is table A using (table, page or row)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Post by harshada »

we are not using any specific patitioning..It is Auto...
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Post by harshada »

And regarding table locking I have not set any specific locking mechanism..as I do not know how to do it
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Are there any duplicate in the key values ?
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Post by harshada »

In the caluse 'where x=orchestrate.z'. So here both X and Z are primary key.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

harshada wrote:In the caluse 'where x=orchestrate.z'. So here both X and Z are primary key.
What is that suppose to mean ?
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Post by harshada »

Sorry..there are no duplicate in the key values...
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Have you got the SQL associated with all those 4 blocked/blocking sessions from Oracle trace file?

would you mind to post it?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Post by harshada »

I have already posted how the update statement looks like...I can't post the exact update statement...
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

check in the oracle for any table locks, wait etc... check if your SQL is waiting for any lock to be released
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

How big is the table ?

Check whether you land up having table level locks due to the volume.
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Post by harshada »

yes..the table is waiting for locks to be released..but these locks are created due to paralle processing..So the four parallel processing are in a dead lock state I believe..hence no rows are getting updated even if the job is running for days...the table contains more than 50m records...Now I want to undestand is there any mechanism bu which I can avoid this situation..
Post Reply