Writing to Oracle Table is slow

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
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Writing to Oracle Table is slow

Post by ketfos »

Hi,

I am reading from seq file and writing to Oracle table.

The number of input records is 12 million.

The action is set to Update/Insert.
Array size is 400, transcation size = 0, transaction handling = 10000

I am getting like 60 rows/sec.

Seqfile - Transformer - Oracle table.

Any clues/suggestions for improving the performance.

Thks

Ketfos
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Writing to a DB with an Update action of Update/Insert or Insert/Update is always going to be slow..in fact very very slow. Always split your Updates and Inserts. Load them through two seperate links and then it will very much faster.

HTH
Kris

Where's the "Any" key?-Homer Simpson
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Are you monitoring the resources on the database server and the DataStage server? Create a work table and DIRECT path bulk load into the table, then execute a MERGE statement.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
kommven
Charter Member
Charter Member
Posts: 125
Joined: Mon Jul 12, 2004 12:37 pm

Post by kommven »

Try DB Tuning by placing some indexes with Keys columns in place...

Thats the only solution available....

One another Option is to capture your logic in ETL and use insert strategy....
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

Indexing is better idea................



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

Post by DSguru2B »

Even with indexing, you cannot get a enormous boost in the performance if the target stage is set to Insert and update or update and insert. For 12M records, it would be a better to go with Ken's recommendation. A logged activity for this size of data set will be slow.
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 »

kris007 wrote:Writing to a DB with an Update action of Update/Insert or Insert/Update is always going to be slow..in fact very very slow. Always split your Updates and Inserts. Load them through two seperate links and then it will very much faster.
I totally agree. Not just slow but typically the slowest way you can work with a database. When you are going to stick with a DB stage (like OCI) the use of either of the 'dual action' actions - Insert/Update or Update/Insert - is a crutch and a weak design. IMHO.

With any kind of 'large' volume, better to take a more Ken Blandish approach. Leverage the high-speed load capabilities of your database.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vjeran
Participant
Posts: 9
Joined: Fri Oct 14, 2005 6:45 am
Location: Zagreb, Croatia

Re: Writing to Oracle Table is slow

Post by vjeran »

Hi,

there is cute explanation about bulk load and inser/update problem. Probably you get good idea what to do.

viewtopic.php?t=95526&highlight=bulk+lo ... oracle+oci

BR Vjeran
Umbix62
Participant
Posts: 79
Joined: Mon Jan 16, 2006 2:47 pm

Re: Writing to Oracle Table is slow

Post by Umbix62 »

Hi

can you describe me the layout of the table and can you tell me how do you update or insert the rows (update fields keys)?

Thank you

Umberto
Post Reply