Newsgroups: comp.databases.oracle
Subject: Re: Delete without rollback?
References: <4r81l3$4g1@kuikka.inet.fi>
pjr@sip.fi (Petri J. Riipinen) writes:
>Hi there.
>I have this one table, which I need to empty every now and then during my
>development. It's not too big, about 10000 rows. But when I do a complete
>delete (Delete * from mytable) it always fails and complains that the size of
>the rollback was exceeded (or something like that). Ok, I can understand that.
>But I wouldn't want to increase the size of the rollback-segment as this
>delete operation is not going to be used in production, just for my testing.
>So, is there a way to do a "permanent" delete at once, so that Oracle wouldn't
>use any space in the rollback-segment?
>Peace,
> Petri
Petri,
Using the "TRUNCATE" command will bypass the rollback segments when
deleting records. For example, "TRUNCATE TABLE too_many_rows;" will
delete all records.
Note that no triggers that may exist get fired. Also, do not do this to a
table that is a master snapshot.
Good luck,
-Ari Kaplan
Independent Oracle DBA Consultant
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> Visit my Web Page: www.arikaplan.com <->
<-> email: akaplan@interaccess.com <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Back to Ari Kaplan's Home Page