Hi Walter,

The extents you refer to in ur thread is the allocated
space. Oracle by default scans upto the high
watermark. The reason truncate is fast is cause it
resets the high watermark so oracle did not scan
anything for u when it returned 0 rows .. however in
case of delete, it still scanned upto the HWM

Deepak


--- Walter K <[EMAIL PROTECTED]> wrote:
> I have a user that deleted all of the rows in a
> table
> (i.e. 100,000), waited for it to complete, and then
> ran a SELECT COUNT(1) FROM <table>. It took a few
> minutes for '0 rows' to be returned to the prompt.
> The
> table has ~60 extents (128k ea.). Granted, the
> number
> of extents is excessive but it's a development
> instance and this table is an exception.
> 
> Is Oracle scanning through all of the blocks, since
> the space wasn't released, and this is the cause of
> the latency?
> 
> The curious thing is that I told this user to use
> TRUNCATE instead and we talked about using the
> drop/reuse storage clauses. He performed a
> TRUNCATE...REUSE STORAGE and the same select and it
> was night and day in terms of performance. If the
> allocated space isn't being released in this case
> also, why is there such a performance difference
> between the two?
> 
> -w
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute
> with Yahoo! Messenger
> http://phonecard.yahoo.com/
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: Walter K
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX:
> (858) 538-5051
> San Diego, California        -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing).


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Deepak Thapliyal
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to