Rows/Sec

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
pratyusha
Participant
Posts: 50
Joined: Wed Nov 22, 2006 4:58 am

Rows/Sec

Post by pratyusha »

Hi all,
I have two questions here.
1.Suppose the load to the target data base is around 100-400 rows every day,if we define the array size and transaction size somewhere near 10000-15000,will this affect the job performance adversely?
2.I have a job in which we are dealing completely with DB2 data bases and there are no hash files/sequential files
I am reading from a Db2 stage(It is a view-1000-2000 recs/day) and if there are any error records i m writing them to an error table(0-10 recs/day).I have a look up on the target table thru which i check If i have the record is already present in the target.If yes,then again i have a look up on the view which tells me the changed column value and using this i update my taget data base Else I am inserting it.

Now what happens is if i get around 100-300 records/day for update the load finished in 15 minutes or else it is taking 45min to 1 hour for aroung 700 updates.
I have checked the forum thoroughly and made as many changes i can to in array/transaction size.
The inserts and updates have array/trasaction size 1 and 1
The view look up has pre fetch of 1 row/sec and the target dim table look up has pre fetch value of 100 rows/sec

Please tell me what i can do to improve the performance.
After certain time,the rows/sec is going to 0 rows/sec everywhere in the job

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

Post by chulett »

1) We really can't say. Try it and see.

2) Use hashed files for your lookups. That's what Server is all about, the proper leveraging of hashed files.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pratyusha
Participant
Posts: 50
Joined: Wed Nov 22, 2006 4:58 am

Post by pratyusha »

Cant change the job design..because we were asked to tune the existing jobs
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Doing a lookup against the database, directly, is your bottle neck. Unload your table to a hashed file and reference that hashed file. You should see a boost in your job performance.
P.S: Job tuning, sometimes, may and will require design changes. Make that clear to your client.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well... you are severely hampered in your 'tuning' ability if you "can't change the job design". :?

Those direct database lookups (which it sounds like are being done twice) are the worst performant way the job could have been designed. 45 minutes to an hour to process 700 records is pretty bad. About all you can do is ensure the lookup queries are as efficient as possible. Heck, since that seems to be your only avenue of attack, all of your sql should be tuned to the best of your ability.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Suppose rows/sec were even a meaningful metric. You could boost the rows/sec figure simply by using shorter rows.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pratyusha
Participant
Posts: 50
Joined: Wed Nov 22, 2006 4:58 am

Post by pratyusha »

Hi all,
thanks for the replies
All the other dimensions have the same design.
The size of the data is more/less same in each dimension.
so we are clueless :oops:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Again, assure that all of your queries are as efficient as possible. I suspect they can be improved because your current performance is horrid, but who knows. For example, check to see if any new indexes would help.

Either that or get a waiver from the Powers That Be. Redesign the jobs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
VCInDSX
Premium Member
Premium Member
Posts: 223
Joined: Fri Apr 13, 2007 10:02 am
Location: US

Post by VCInDSX »

pratyusha wrote:All the other dimensions have the same design.
The size of the data is more/less same in each dimension.
so we are clueless :oops:
Even though you are "Not Allowed" to change the job design, were you able to try a test implementation of this job using "Hash File Lookup"?
Sometimes, management tends to accept such "tuning" efforts/timelines if they happen to see dramatic improvement in performance.
If you can create 2 test jobs quickly to show the numbers, it should help your cause.
Job1: No hash lookup, but pure table joins and write to target table or file
Job2: Using hash lookup and write to a target table or file.

Good luck,
-V
thamark
Premium Member
Premium Member
Posts: 43
Joined: Thu Jan 29, 2004 12:12 am
Location: US

You could try more option to identify where exactly you have

Post by thamark »

pratyusha wrote:Hi all,
thanks for the replies
All the other dimensions have the same design.
The size of the data is more/less same in each dimension.
so we are clueless :oops:
You could try more option to identify where exactly you have problem.

1) Remove lookup and do straingt DB Update/Insert(This change is from original job)
2) Keep sequential file stage intead of DB Update/Insert(This change is from original job)
3) Try to split insert and update seprately, if it is Upsert.

I guess by doing this you would be able to identify the issue
Hmm i will fill this when ever i get one
pratyusha
Participant
Posts: 50
Joined: Wed Nov 22, 2006 4:58 am

Post by pratyusha »

Hi
thanks for the suggestions
I have tried all the options mentioned and did some changes to the commit level and was able to bring down the time upto ten minutes less

one more thing i would like to clarify here is:
They are using a routine for generating a ERR_ID.This routine interacts with the data base evokes a sequence and gets the value from it and assigns it to the column.
Please find the code below:
If
IsNull(Db2GetMaxColVal($p_TargetServerNm, $p_TargetUserNm, $p_TargetUserPwd, 'Err_Id', 'Etl_Job_Err_Log')) then 1 else Db2GetNextSeqVal($p_TargetServerNm, $p_TargetUserNm,
$p_TargetUserPwd, 'Seq_Err'))

Most the the time, the records which come for this routine are >2000.
Will the execution of this routine result in slowing down the process?
Because when i see the log,there is a big time lag at this point

Please advice
Thanks
Prathyusha
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

pratyusha wrote: They are using a routine for generating a ERR_ID.This routine interacts with the data base evokes a sequence and gets the value from it and assigns it to the column.
Please find the code below:
If
IsNull(Db2GetMaxColVal($p_TargetServerNm, $p_TargetUserNm, $p_TargetUserPwd, 'Err_Id', 'Etl_Job_Err_Log')) then 1 else Db2GetNextSeqVal($p_TargetServerNm, $p_TargetUserNm,
$p_TargetUserPwd, 'Seq_Err'))

Most the the time, the records which come for this routine are >2000.
Will the execution of this routine result in slowing down the process?
Because when i see the log,there is a big time lag at this point
Clearly the answer to your time lag question is yes. Your monitoring shows this. But, if you're not permitted to change the design, there's nothing you can do to address this.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pratyusha
Participant
Posts: 50
Joined: Wed Nov 22, 2006 4:58 am

Post by pratyusha »

Hi Ray
I could not read your post
Not a premium member
Can you help me please? :roll:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Here, let me quote him for you (I don't think he'll mind). It's nothing new or anything we haven't said over and over already:
ray.wurlod wrote:<snip> But, if you're not permitted to change the design, there's nothing you can do to address this
-craig

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