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 -> Re: Insert without redo log

Re: Insert without redo log

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 15 Feb 2001 08:30:35 -0000
Message-ID: <982225998.12720.0.nnrp-08.9e984b29@news.demon.co.uk>

Inserts into temporary table generate rollback, and the rollback is covered by redo, so an insert into a temporary table does results in redo - albeit less than that required for a normal table.

You can do direct mode inserts to a GTT, but the table has to be 'on commit preserve' because you need to issue a COMMIT before you can select the rows back (standard
feature of direct inserts).

Just, to emphasise you point about GTTs
being private, you can't (usefully) SQL*Load into a GTT, as the data disappears the moment the SQL*Load session ends.

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases
Publishers:  Addison-Wesley

Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



Howard J. Rogers wrote in message ...

>
>Also in 8i, there is now the concept of a global temporary table, and DMLs
>on them do not generate redo under any circumstances. It is possible you
>could therefore contemplate loading into a temporary table first,then using
>an 'insert into blah select * from temptable' to get the data into the main
>table -that's a direct insert, and would respect a nologging attribute.
>
>I have not, however, ever tried doing a direct insert using a temporary
>table as the source, so I can't guarantee it would work (and in any case it
>needs 8i). If you *do* have 8i, and want to try it out, remember that
>temporary tables are private to a session, and retain data only after a
>commit if you create them with the 'on commit preserve rows' construct.
>They are also instantly cleared out when the session ends.
>
Received on Thu Feb 15 2001 - 02:30:35 CST

Original text of this message

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