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: Delete without Rollback ?

Re: Delete without Rollback ?

From: Matt Brennan <mbrennan_at_gers.antispam.com>
Date: Wed, 05 Aug 1998 16:58:43 GMT
Message-ID: <01bdc092$54fd8160$049a0580@mcb>


You can use truncate to get rid of *all* rows, but if you need a where clause, you might be out of luck.

However, you can create a copy of the table with just the rows you want to keep:

create table my_keeper_table as
select * from my_original_table
where...
/

And then truncate the original one:

truncate table my_original_table
/

And then re-insert the rows you kept and drop the temporary table

insert into my_original_table
select * from my_keeper_table
/
commit
/
drop table my_keeper_table
/

Still can't guarantee you won't have rollback problems, though, but it *might* help. Depends on how many rows you are keeping. Like if you're getting rid of 50K rows and keeping 50K rows, you might not be better off. If you are getting rid of 50K rows and keeping 10K rows, it might work. --
Matt Brennan
SQL*Tools Specialist
GERS Retail Systems
9725-C Scranton Road
San Diego, California 92121
1-800-854-2263
mbrennan_at_gers.com
(Original email address is spam-blocked.)

John Finn <a_at_a.com> wrote in article <35C85724.CCE4EA38_at_a.com>...
> Does anyone know how to Delete without Rollback transaction overhead?
>
> "DELETE FROM TABLE1 WHERE ..."
>
> and no transaction overhead, rollback, commit ...
>
>
> thanks
> jfinn
>
Received on Wed Aug 05 1998 - 11:58:43 CDT

Original text of this message

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