Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> fastest way to insert/update i million rows

fastest way to insert/update i million rows

From: <nandagopalj_at_hotmail.com>
Date: Thu, 02 Sep 1999 14:33:52 GMT
Message-ID: <7qm1sg$i51$1@nnrp1.deja.com>


Hello everyone:

I have a need to update about 1 million rows of a table and insert another million rows into two other tables. I am constrained by the time to be able to perform all the above operations of about 12 hours. Therefore I need the fastest means to do this.

I have the following ideas:

  1. Use sqlloader for inserts Pro-c/c++ host arrays to update the records.
  2. Write a PLSQL function to insert and update the records and then call it using Pro-c/c++ code using host arrays.
  3. Write a perl script to generate all the insert and update SQL statements into a ascii file and then use sqlplus to process the ascii files.

I intend to have "multiple processes" processing about 50,000 records simultaneously.

I would appreciate any responses to following questions:

  1. Which is the best method of the three methods above ? Or is there a better method ?
  2. Can disabling the constraints increase the speed of updates? If yes, how complex is the process of enabling the constraints back again ? ( I am sure that there will be no other process updating the data and my updates do not violate integrity of the data.)

Thanks
Nan.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Sep 02 1999 - 09:33:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US