Performance Tuning

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Shabnam
Participant
Posts: 17
Joined: Thu Mar 10, 2005 2:06 am

Performance Tuning

Post by Shabnam »

Hi

I am tuning a select query used in datastage job.It is having 35 NVL functions. If i handle this in transformer, will it increase the performance of the job as a whole.This single query is taking 1 hr in the production environment.

Thanks and Regards
Shabnam
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

did you try modify stage??
tagnihotri
Participant
Posts: 83
Joined: Sat Oct 28, 2006 6:25 am

Re: Performance Tuning

Post by tagnihotri »

Tunning querries depends on n number of things i.e. whether db is paritioned ? whether you are using indexing efficiently ? Whether you are extracting only required collumns? ....

As far as handling derivation in transformer stage is concenred it again depends but db2 normally turns to be efficient in comparison to DS server. But worth trying it on both and do a comparison of stats!
Shabnam
Participant
Posts: 17
Joined: Thu Mar 10, 2005 2:06 am

Post by Shabnam »

I am using server stage. It doesn't have modify stage. Need to handle in transformer only.
Thanks and Regards
Shabnam
Shabnam
Participant
Posts: 17
Joined: Thu Mar 10, 2005 2:06 am

Post by Shabnam »

Hey,

The database is Oracle 9i

Shabnam
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You said the query is taking about an hour to finish in production env. Was that the same case in dev. and uat etc.?
How many cpus do you have in your prod. box. You can probably create a multi-instance job which does selects and handles nvl in the transformer.
Extract your data in chunks depending upon the invocation id you send in.
Or you can do a simple select on the complete data set, partition it with a link partitioner and send it to different transformers (the number will depend upon how many cpus you have) and then do collect it at the end.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How long does the Oracle query take in another utility, such as sqlplus or TOAD? I don't believe doing the NVL operations in DataStage would be any faster.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasadduvasi
Participant
Posts: 19
Joined: Wed Feb 15, 2006 11:08 am

Re: Performance Tuning

Post by prasadduvasi »

HI,
as said by the others indexing also affects.
better to use DB than DS.

My suggestin is while populating data into Prd Db use Std Prc stage and write a proc apply ur NVL functions which wld be better i think

chk it in Toad sql editor
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Post by talk2shaanc »

You can do a explain plan on the query and check the cost of both the SQL's; the one with NVL and second one without NVL. Check the difference, if it very high or its minimal.
Shantanu Choudhary
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Another checks could to see if your query is picking up the right indices.
Sometimes the Oracle optomizer does not pick up the indices you would like it to pick up.
In such cases adding the correct HINTS can increase the performance dramatically.
Also ask your DBA's to run stats on the involved tables, if it not done for a while.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Shabnam
Participant
Posts: 17
Joined: Thu Mar 10, 2005 2:06 am

Post by Shabnam »

Hi all,

In other utilities (Toad) also it is taking that much time. In other environment, the data is very less, so simulation is a long process( Need to do a data refresh from production server). I am not sure about the number of CPU's in the server as i am new to this project, but raised a ticket to OS team to know it.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

If it is taking almost the same time in TOAD, then you don't have option other than to tune it, before putting using it in datastage. The performance of the query cannot be enhanced inside datastage.

Tip:
Instead of doing a data refresh from production server, can you point your query to run against the production(If performance to production environment is not an issue)?
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Post Reply