Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Exporting large tables!!!
I would be wary of copying your data in one statement as discussed.
If the reason you are exporting the table is because it's getting very large
then you will likely be in danger of blowing your rollback segments by doing
the likes of
create table ... as select * from ...
You'll probably want to put this into a piece of PL/SQL. have a cursor and loop through it with insert statements remembering to commit every few thousand records or so.
Alternatively, why not use the folliwng algorithm.
Of course this only works if your have a date created/updated column in your table. Alternatively, if you are using a sequence to populate a primary key then keep a copy of the highest ID in the table and delete all those lower than it.
I agree though, short of locking the table it'll be a slow and long job.
--
Alan D. Mills
Jerry Gitomer wrote in message <35D9D3FB.29F6_at_ictgroup.com>...
>Hi Vinnie,
>
> I have two proposed solutions and am happy with neither of them. The
>first one requires locking the table from inserts and updates for as
Received on Wed Aug 19 1998 - 07:18:20 CDT
![]() |
![]() |