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 -> Why does INSERT ... AS SELECT ... use TEMP, contrary to CREATE TABLE ... AS SELECT...?

Why does INSERT ... AS SELECT ... use TEMP, contrary to CREATE TABLE ... AS SELECT...?

From: Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl>
Date: Sat, 13 Jan 2007 10:02:47 GMT
Message-ID: <45a8ad58.3796968@news.hetnet.nl>


Oracle 9.2.0.5.0 on Open VMS Itanium.

I have a table SRC with degree default, and parallel dml enabled for the session. If I do:

CREATE TABLE tgt
PARALLEL NOLOGGING
AS SELECT * FROM src

data from SRC is read, and written immediately to TGT, in 4-fold parallel.

If I then truncate table TGT, and do a

INSERT INTO tgt
SELECT * FROM src

data from SRC is read into temporary tablespace buffers first, and after that the buffer contents is written to TGT, again all in 4-fold parallel.

Why the detour in case of the INSERT?

Regards, Jaap. Received on Sat Jan 13 2007 - 04:02:47 CST

Original text of this message

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