Extract data efficiently

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
loe_ram13
Participant
Posts: 35
Joined: Thu Apr 12, 2007 1:17 am

Extract data efficiently

Post by loe_ram13 »

I have to extract data from a table that has summarized historical records of past 1 year.
Then I merge and aggregate the data with current month's data.
Then i truncate the table and load the merged data again.
Is there a better way than doing this,as extracting the data takes more than 6 hours.
Pls help for performance tuning.........
Thanx
Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Welcome. Pretty big work order on a first post - tune a job for you. And made more difficult because we don't know any specifics of your job design.

How about this? Identify your bottleneck or bottlenecks. Attack them one by one. If you mentioned that 'extracting takes 6 hours' you think it could take less time for the volume of records involved, yes?

Describe your 'extraction' segment - what stages are used? What databases are involved? What is the volume of data? What kind of transformations are you doing? Are you going directly from db to db and suffering from 'back pressure'? Search for those two words to find a description of and resolution to that phenomena, if it is applicable.

Let's start with that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
loe_ram13
Participant
Posts: 35
Joined: Thu Apr 12, 2007 1:17 am

Post by loe_ram13 »

1.There is a base table from which i extract data for the previous entire month and store it in a .dat file.
2.Then i take the entire data from the target table (which do not have prevoius month data) and again store it in a .dat file
3.Then i merge and aggregate these file.
4.Then i truncate the target table.
5.Then i load the merged .dat file to the target table.
Here,step 2 takes more than 6 hours.
Is there any alternative than truncating entire data and loading it again.
Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

chulett wrote:Describe your 'extraction' segment - what stages are used? What databases are involved? What is the volume of data? What kind of transformations are you doing?
-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 »

Craig's questions are pertinent; without knowing what stage types you are using and data volumes you are dealing with, for example, it would be imprudent to provide advice. What is the basis for the merge? Are the source and target tables in the same database instance?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply