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: how does truncate table work?

Re: how does truncate table work?

From: Pete's <empete2000_at_yahoo.com>
Date: 19 Aug 2003 05:26:48 -0700
Message-ID: <6724a51f.0308190426.4832fab8@posting.google.com>


Basically, Truncate Table resets a file pointer. So in essence, it does delete the records but not really, the records that are in the table are no longer accessible since the high water mark is reset. Therefore, redo is only created for the pointer move, not for each record. Once the statement is done, there's no rollback since truncate table is a DDL statement.

HTH,
Pete's

hopehope_123_at_yahoo.com (utkanbir) wrote in message news:<f6c90ebe.0308182200.3f51f194_at_posting.google.com>...
> Dear Gurus,
>
> I am new with oracle database but strong experience with informix .
> In one of the oracle training which i have recently involved , the
> lecturer asked the difference between delete and truncate table.
> Although i did not exactly know , i can guess that , truncate table
> runs fast because instead of deleting each records , it can invalidate
> the table by cahnging a flag in data file headers or etc. ( thinking
> of informix architecture) But the lecturer said truncate table also
> deleted records but did not generate redo log data thats why it was
> faster.
>
> Is it possible to be very fast for example deleting 100000000 rows
> without creating redo log entry. I had better drop & create it?
>
> I will be appreciate if someone comments about this.
>
> Kind Regards,
> hope
Received on Tue Aug 19 2003 - 07:26:48 CDT

Original text of this message

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