How to insert many records in short time?(b26)


Is it possible that I insert about 6,000,000 records into one table in half an hour? The table has 4 fields.
Does somebody know any solution ?


Ans1:

It might be possible, if you have access to either SQL*Loaders Direct mode,
or if the target table can support Parallel DML operations (requiring
Oracle8).

Also, you won't be able to have an Index on the table in my best guess. BTW
- If it is a small NT box, I would give up now.

For a more suggestive answer, please advise the group on source of the 6M
rows, the target database version and platform, and the nature of the data,
do you need PK's or FK's after the load.



Ans2:

Try one of these:

     SQL Loader;
     EXP/IMP
     create a program in the native language ProC, etc.



Ans3

Disable all the indexes and use SQL*Loader Direct mode to load all rows.
But again it depends on server  you're using.



Ans4:

sqlldr using the direct=true option.  See the server utilities manual.



Ans5:

Oracle8 has this new feature of bind array inserts. It's very fast indeed.
It's aprox. 3 times faster as normal inserts
We made a script inserting 100.000 records (8 column table, 6 filled; 4
indexes on it)
which completed in 20 seconds. this was 3 times faster as the normal way.
Without the indexes it would be finished within 14 seconds
--> 4 * 100.000 = 400.000 inserts per minute
--> 400.000 * 30 = 12.000.000 inserts in half an hour!!!
 

Hosted by www.Geocities.ws

1