Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: "create table as" statement versus an "insert into" statement

Re: "create table as" statement versus an "insert into" statement

From: Yosi Greenfield <yosi_at_comhill.com>
Date: Tue, 24 Oct 2000 14:38:00 -0400
Message-Id: <10659.120078@fatcity.com>


Also, the insert is DML and therefore produces rollback information. The create is Data Definition and produces no rollback data.

hth,

Yosi

tom_at_cdproc.com wrote:

> Truncating a table and releasing storage (the default) resets the high water mark.
> When you do a direct load or create table as select from, Oracle does not bring the
> rows through the buffer cache. It is the fastest way to move rows around. In a direct load
> or CTAS, Oracle just builds blocks and places them in the table, not bothering to check
> constraints until done. Further, Oracle does not go checking for each row, for a place to
> put it. Instead, it just appends the rows.
>
> Direct loads of rows can be done unrecoverable/nologging. If unrecoverable/nologging,
> there will be a lot less redo generated. This also saves time.
> ----- Original Message -----
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Sent: Monday, October 23, 2000 10:01 PM
>
> >
> > I could use some help.
> >
> > Does someone know why a create table as statement would perform better than
> > a truncate table, and then insert into statement?
> > Gut instinct tells me the create table is cleaner and the insert into has
> > to find free chunks, but that can't be all of it.
> >
> > The background is that we have some developers who are executing large data
> > loads and have to recreate objects every evening as part of a hierarchical
> > OLAP tool process. They are looking to shave time wherever they can to get
> > it all into their batch window.
> >
> > I am not sure where to begin to look for information that would show why
> > one way would perform better than the other.
> > I think it would be under parsing algorithms, which would be cool to learn
> > if there was a list of them or a chart.
> >
> > Thanks in advance,
> >
> > Heidi
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author:
> > INET: Heidi_Schmidt_at_gillette.com
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Tom Pall
> INET: tom_at_cdproc.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

--
Thanks,

Yosi


---------------------------------------------------------
Received on Tue Oct 24 2000 - 13:38:00 CDT

Original text of this message

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