January 2012
Intermediate to advanced
542 pages
11h 28m
English
In this recipe we will see how to insert many rows in a table using a particular INSERT statement to boost performance.
The following steps demonstrates multiple row insertions in the same INSERT statement:
SH schema:
CONNECT sh@TESTDB/sh
MY_SALES with the SALES table structure:
CREATE TABLE MY_SALES AS SELECT * FROM SALES WHERE ROWNUM < 1;
SALES table in the newly-created table:SET TIMING ON INSERT INTO MY_SALES SELECT * FROM SALES; COMMIT; SET TIMING OFF
MY_SALES table:
TRUNCATE TABLE MY_SALES;
SALES table in the newly-created table using direct path inserting:SET TIMING ON INSERT /*+ APPEND */ INTO MY_SALES ...
Read now
Unlock full access