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: TRUNCATE TABLE acquire rollback segment?

Re: TRUNCATE TABLE acquire rollback segment?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sat, 28 Apr 2001 19:45:47 +0800
Message-ID: <3AEAAD6B.18C5@yahoo.com>

Tom wrote:
>
> I always thinking TRUNCATE TABLE is fast because no rollback is generated
> for the operation. Suddenly, I found foolowing in COUCHMAN's DBA
> certifaction book:
>
> "Despite your inability to rollback a table truncation, Oracle does acquire
> a rollback segment for the job. Why? Because if you terminate the truncate
> table command, or some failure occurs, the rollback segments stores the
> changes made for the duration of the truncate operation to enable crash
> recovery."
>
> I do not quite understand what information is put in the rollback for the
> TRUNCATE operation. Your help is appreciated.
>
> Tom

Since the truncate will result in the high water mark for the table being altered (ie reset back to 'zero'), this change needs to be able to be rolled back...

Note though that some versions of oracle (8.0.x mainly) will crash the database when a break is attempted during a truncate operation

hth
connor

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"
Received on Sat Apr 28 2001 - 06:45:47 CDT

Original text of this message

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