| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: Large Table Update/Merge problem
raghuraj_dasari_at_yahoo.com (Raghu) wrote in message news:<45d4e55e.0408172303.e6aadec_at_posting.google.com>...
> I have a temprary table with 5 million rows (A)
> which needs to be appended with 90 million row table (B).
>
> 60% of the rows of the 5mil rows already exist in the big table
>
> i need to update/merge the table A data with table B
> Oracle version is 8.1.7
>
> Please advice which method is the fastest.
> i need to do it <30 mins
Fastest method is using SQLLoader:
- export temp table in a flat file - make sure a primary key exist on dest table - allow SQLLoader accept 60% * 5mil = 3mil errors ( or adjust as youprefer )
You can also write some PL/SQL to insert a row a time catching and ignoring dup key exception. Commit every some thousand not to let rollback seg grow too much
Insert 'where not exist' is terrible.
Bye
Cristian
Received on Thu Aug 19 2004 - 04:06:27 CDT
![]() |
![]() |