Job hangs when performing insert/update

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
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Job hangs when performing insert/update

Post by devidotcom »

Hi All,

We are currently facing an issue with our datastage jobs. After performing the required transformations we do a self lookup on the table and then filter records as insert and update. The job has an update and insert flow to perform this.

The insert flow using upsert method with the update query with condition 1=2 and the update flow has a plain update query.

The jobs were working fine all this while even in production. We are facing issues where the processing is very slow, infact hangs. We had a look at the database front and found that the locks are generated on the child tables that have foreign key relationship. When we kill the job or unlock those tables the job gets aborted.

There is something going wrong, why would we have locks on the child tables, is there some setting on DataStage thats causing this.

When we disabled the FK constraints the job ran to success in minutes. Is this approach of having insert/update in the same job advisable? I don't see a problem doing this in PX version as everything runs in parallel.

There is no issues with the data too, there is a clear distinction between insert and update records.

Please suggest and help us resolve this issue.

Thanks.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Job hangs when performing insert/update

Post by SURA »

Give a try for "Commit" on 1000 rows.

DS User
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

hhmm did not work.. :(
le thuong
Premium Member
Premium Member
Posts: 76
Joined: Wed Sep 09, 2009 5:21 am

Post by le thuong »

I would avoid having the same table as reference table (self lookup as you mentioned) and as target for insert/update in the same job. You can read the table (in a previous job) and populate a data set, then use this data set as reference in the current job.
Do you have index on the column(s) of the "Update ... where" clause ?
Thuong

best regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What database are we talking about? And are you saying you are loading a parent table where child tables are getting locks or vice-versa? FWIW, I don't see a 'self lookup' as being any kind of an issue here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply