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 millions_of_rows, how to COMMIT every 10,000 rows ?

Re: INSERT millions_of_rows, how to COMMIT every 10,000 rows ?

From: rbs <rbs100_at_gmail.com>
Date: 27 Mar 2005 20:12:46 -0800
Message-ID: <1111983166.716091.109490@f14g2000cwb.googlegroups.com>


If you are doing from sql plus, try using this command at the sql prompt:
set autocommit <number>
In your case the <number> could be 10000. Regards
RBS
HansF wrote:
> On Sun, 27 Mar 2005 05:43:53 -0800, xtanto wrote:
>
> > Hi All,
> >
> > I want to insert millions of rows from old table into new table.
> > (different in structure, so that I have manipulate in the query)
> >
> > INSERT INTO [new table] SELECT ... FROM [old table]
>
> Just thinking out loud ... You might also want to look at the 'CREATE
> TABLE AS SELECT ..." capability of Oracle.
>
> >
> > How can I do COMMIT for every 10,000 rows ?
>
> One common reason for this request is because of a ROLLBACK SEGMENT
(or
> UNDO) problem. If true for you, you are strongly encouraged to
resize
> your ROLLBACK SEGMENTS instead of using a COMMIT. The interim COMMIT
> ultimately ends up requiring a lot more resources, can have secondary
> problems (such as different ROLLBACK SEGMENT issues), and is
generally a
> *lot* slower.
>
> If you really want to do the commit, a solution is to create a PL/SQL
> procedure with a loop.
>
> /Hans
Received on Sun Mar 27 2005 - 22:12:46 CST

Original text of this message

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