9Million rec in Oracle tbl, Update or Insert 7rows/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
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

9Million rec in Oracle tbl, Update or Insert 7rows/sec!

Post by vinaymanchinila »

Hi,
I have a table with 9 million records(Initial load) , and when we run the daily it is incremental and I have like 250K records every day, but it is writing at 7 recs/sec.
Is there any way around this , because I need to run this load more than once a day , probably 6 times !


Any help !
Thanks
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
Have you thought on lines of table partition? How big is the Oracle table?
Are there any lookups in the job?



Ketfos
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

No, but i built a hash onthe target and using two links to write to it, one just for update and the other just for insert, it islot better this way now.
Thanks,
logic
Participant
Posts: 115
Joined: Thu Feb 24, 2005 10:48 am

Post by logic »

Hi,
Did you check if there are improper indexes on the table. Also i guess looking into transaction size and array might help..I think.
wnogalski
Charter Member
Charter Member
Posts: 54
Joined: Thu Jan 06, 2005 10:49 am
Location: Warsaw

Post by wnogalski »

First of all You should partition your table f.e monthly, then when loading the data remove all indexes for the partition, delete all data for the reloaded day, insert the data and rebuild indexes - this should be faster than 7 rows/sec :wink:
Regards,
Wojciech Nogalski
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Assuming they're all inserts, use a bulk loader. SQL*Load (command is sqlldr) for Oracle.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

The solution will depend upon the level of change you are preared to do and the authorisation level you are granted.

If it is a full table reload, you can download the full table and repopulate it later.

You can partition using something like batch id or load id

You can load into a temp table an then use SQL to merge them.
mdan
Charter Member
Charter Member
Posts: 46
Joined: Mon Apr 28, 2003 4:21 am
Location: Brussels
Contact:

Re: 9Million rec in Oracle tbl, Update or Insert 7rows/sec!

Post by mdan »

Hi,
You may use partitioner stage to split file (round-robin) and pump data in parallel. We started from 800 rows, sending via 5 connections we got 4000 - but still very slow for us :(. We did some test to find the maximum: it looks like over 6 upload branches we don't get any improvements.
Probably you need also a very good dba - we don't have one ... oracle gets into trouble when we have large updates - we used update then insert. With only inserts we got an aggregate performance of 8000 per second - still slow ... no indexes only a pk

Any other idea ?

vinaymanchinila wrote:Hi,
I have a table with 9 million records(Initial load) , and when we run the daily it is incremental and I have like 250K records every day, but it is writing at 7 recs/sec.
Is there any way around this , because I need to run this load more than once a day , probably 6 times !


Any help !
Thanks
ukyrvd
Premium Member
Premium Member
Posts: 73
Joined: Thu Feb 10, 2005 10:59 am

Post by ukyrvd »

vinaymanchinila wrote:No, but i built a hash onthe target and using two links to write to it, one just for update and the other just for insert, it islot better this way now.
Thanks,
As mdan pointed out, splitting the stream into 3/4 inserts and updates would be fast. In essence thats what you have done by seperating inserts/update streams.

Checkout the job monitor and see exactly at what stage you are seeing the drop in rows/second .. and if your logic permits.. try partitioning stream before that stage .. it could help.

Another option would be sperate all updates to anew job if their percentage is low (grab them in a seq file .. ) and use sql*loaded as ray pinted out for all inserts.
Post Reply