General
cancel
Showing results for 
Search instead for 
Did you mean: 

Performance :SQLLoader Versus Select for Update

Chartier Jerome
Frequent Advisor

Performance :SQLLoader Versus Select for Update

Hi,

I'm currently in front of a performance problem about a FETCH with an update in table ( 80 millions Records ) and this request commit 25 row per seconds.
SO I would like to now if
- I select all my record
-,insert them in a temporary table
-and finally reload with sqlldr the empty table with the updated records
that will be more efficient in term of performance than the update describe on top.

thanks in advance
LLB
J@Y
3 REPLIES
Mark Greene_1
Honored Contributor

Re: Performance :SQLLoader Versus Select for Update

Like so many things, it depends. Are there indexes with the table that are getting rewritten with each update? Can you make sure your temporary table in on a different physical & logical drive than the table you are selecting against? And is there sufficient memory and paging space on the system to account for moving this much data along with the regular activity on the system?


mark
the future will be a lot like now, only later
Jean-Luc Oudart
Honored Contributor

Re: Performance :SQLLoader Versus Select for Update

If this is a once off or if the table is not accessed by anyone else when you run thiss specific update, you can
- write updated rows to flat file
- truncate the table
- reload (Direct ?) into table

We had a similar pb in the past where we had to read and append a huge table with updated info. We chnage the batch so we wrote into a flat file and load append to existing table.

Regards,
Jean-Luc
fiat lux
Yogeeraj_1
Honored Contributor

Re: Performance :SQLLoader Versus Select for Update

Hi,

If I had to update millions of records I would probably opt to NOT update.

I would more likely do:

CREATE TABLE new_table as select from old_table;

index new_table
grant on new table
add constraints on new_table
etc on new_table

drop table old_table
rename new_table to old_table;


you can do that using parallel query, with nologging on most operations generating very little redo and no undo at all -- in a fraction of the time it would take to update the data.

hope this helps too!

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)