I've never heard about serial mode of the Oracle database.Originally posted by thomgreen
Although I also read that my database must be running in serial mode.
You can use direct-load insert in serial or parallel mode. Parallel means that the execution of insert is performed by more servers thus performs better. Parallel works only in EE.
Both serial and parallel direct-load inserts don't generate redo/undo.
The right way could be:Code:Conventional INSERT: scott@oracle> create table o as select * from all_objects where 1=0; Table created. scott@oracle> @rs NAME VALUE -------------------- ---------- redo size 59440 scott@oracle> insert into o select * from all_objects; 13472 rows created. scott@oracle> @rs NAME VALUE -------------------- ---------- redo size 1896536 redo generated: 1,75 MB scott@oracle> drop table o; Table dropped. Direct-load INSERT: scott@oracle> create table o NOLOGGING as select * from all_objects where 1=0; Table created. scott@oracle> @rs NAME VALUE -------------------- ---------- redo size 1979404 scott@oracle> insert /*+ APPEND */ into o select * from all_objects; 13472 rows created. scott@oracle> @rs NAME VALUE -------------------- ---------- redo size 2019428 redo generated: 39kB
1. drop all indexes and triggers on the table
2. ALTER TABLE the_table NOLOGGING
3. INSERT /*+ APPEND */ INTO the_table SELECT ...
4. COMMIT
5. ALTER TABLE the_table LOGGING
7. recreate triggers and indexes (possible in nologging as well)
8. backup database
Direct-load insert is suitable for irregular, one-shot operations as copying data from production to test database since subsequent backup is a must.
For regular inserts in a production database better use conventional insert because of possible recovery.
In a production database, redo makes sense.
Ales




Reply With Quote