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: Moving a large # of rows from one table to another ?

Re: Moving a large # of rows from one table to another ?

From: Dominic Baines <rdab100_at_cam.ac.uk>
Date: Wed, 26 May 1999 07:24:57 +0100
Message-ID: <374B93B9.A5B77CBA@cam.ac.uk>


Jerry Gitomer wrote:

> Hi,
>
> Okay, how about this approach.
>
> 1. create a temporary table with the rows you want to keep.

commit after each insert so no rollback ?

> 2. update your history table

Isn't that what you've just done for him anyway ?

> 3. Drop the original table

This would require him to use huge amounts of rollback !

> 4. Rename the temporary table and recreate any required
> constraints.

Truncating the original table after the above (no rollback) may be the easiest option.

Dominic Baines

>
>
> regards
>
> Jerry Gitomer
> ----------------------------------------------------------
>
> Richard Elliott wrote in message
> <01bea6e1$0a4810a0$4b03c896_at_isbarae.transco.twc.com>...
> >I am not moving all the rows to history, just those older than 24 months,
> >truncate will drop all rows from the remaining table not just the ones
> >migrated to history. But Thanks Anyway !
> >
> >Dominic Baines <rdab100_at_cam.ac.uk> wrote in article
> ><374ADA51.EC0DBA95_at_cam.ac.uk>...
> >> What about a commit after each of the row inserts into the history table
> >> and using truncate to drop the rows from the old table ?
> >
Received on Wed May 26 1999 - 01:24:57 CDT

Original text of this message

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