Performance issue

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
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Performance issue

Post by sreddy »

Hi

I am reading source data and write in to target table using DB2 API stage.
While writing data in to target table , deleting existing records from target table. It is a daily process. When i ask my lead why do not we truncate and load the data at traget table. They are not accepting.

The existing job is taking around 2hrs in production.
Over 2 milion records.
How can increase the performance. Please help me out....
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Why is your lead not accepting?

Did you measure the time if you start with a blank db2 table against it being fully loaded ?
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

If really there is any problem with truncate, they should give an explanation.

delete is always slow and dead slow when there are referential integrity constraints and other factors like rollback space and all.

Hence you might like to ask your lead again if you can use truncate option.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Remember that DB2 has no "truncate" function, there is a "LOAD FROM /DEV/NULL OF DEL REPLACE INTO YourTable" equivalent, though.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yoda says: "Odd, I have always found that." :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Please have a look at this page, (DB2 9.1 for z/OS Topic date: April 2009)

http://publib.boulder.ibm.com/infocente ... tewnew.htm
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

also there is a stored procedure in DB2 which is used like:
call truncate(tablename) which inturn calls the statement
'IMPORT FROM /dev/null OF DEL REPLACE INTO tablename'
Similar to what you have mentioned.
or
alter table schema.table_name activate not logged initially with empty table
Last edited by priyadarshikunal on Thu Aug 06, 2009 9:54 am, edited 1 time in total.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Just to add that that's only applicable for z/os, and not LUW
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

well that was the source of confusion as I am not working on DB2 :wink:
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Post by sreddy »

Thank you every one.

I am thinking to redesign job using change capture.

Insert / Update. with this method no need to delete or truncate the records.

please drop your suggestions.
SReddy
dwpractices@gmail.com
Analyzing Performance
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

if you are deleting all records from table, then truncate and load in best option.
may be the requirement is not clear, why your lead is not accepting if the performance will improve.
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Post by sreddy »

If i used Truncate we are loosing monthly updated purchase order data.
that is why he is not interested for Truncate and load.
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Post by sreddy »

If i used Truncate we are loosing monthly updated purchase order data.
that is why he is not interested for Truncate and load.
Post Reply