Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: why CTAS faster than Insert select?
Jonathan,
Here is the details:
version of oracle: 9.2.0.5.0
time recorded in v$session_event:
CTAS:
EVENT WAITS TIMEOUTS TOTAL_TIMEAVG
PX Deq: Execute Reply 1612 63 39707 25 SQL*Net message from client 24 0 688 29 PX Deq: Parse Reply 16 0 2 0 latch free 1 0 0 0 enqueue 1 0 0 0 control file sequential read 4 0 0 0 SQL*Net more data from client 1 0 0 0 SQL*Net message to client 24 0 0 0 log file sync 5 0 0 0 PX Deq: Join ACK 25 0 0 0 PX Deq: Signal ACK 6 0 00
11 rows selected.
Insert Select:
EVENT WAITS TIMEOUTS TOTAL_TIMEAVG
PX Deq: Execute Reply 1729 170 62951 36 SQL*Net message from client 27 0 888 33 PX Deq: Signal ACK 2 2 11 5 log file sync 5 0 2 0 PX Deq: Parse Reply 17 0 2 0 latch free 3 0 1 0 control file sequential read 4 0 0 0 db file sequential read 8 0 0 0 PX qref latch 1 0 0 0 SQL*Net more data from client 1 0 0 0 SQL*Net message to client 27 0 0 0 PX Deq: Join ACK 7 0 00
12 rows selected.
redo generated:
CTAS: 2130240
INSERT: 4753332
INSERT: Elapsed: 00:10:43.61
NAME
VALUE
CREATE TABLE TMP_PKT_COLT_FNCL_ST_SPST NOLOGGING
PARALLEL 24 -- since 24 is used by Insert as well(oracle determines it)
INSERT /*+ APPEND */
INTO TMP_PKT_COLT_FNCL_ST_SPST
SELECT ... FROM ... WHERE ...;
For both tests, the table is created as nologging.
Thanks,
Linda
Received on Thu Mar 31 2005 - 11:33:01 CST
![]() |
![]() |