Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: truncate command internal behavior

Re: truncate command internal behavior

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 17 Oct 2006 22:21:02 +0100
Message-ID: <005a01c6f232$26d5a4e0$0200a8c0@Primary>

True.

I think 8i was walking the buffer cache, so the cost was proportional to the size of the buffer cache.

Then 9i introduced a 'small table' strategy which walked the blocks in the table then, for each block, checked if the block was in the buffer cache - which made the cost proportional to the size of the table.

Then 10gR2 seems to be working on a linked list per object running through the buffer headers - but I don't know where the linked list is rooted - which should make the cost proportional to the number of blocks buffered.

All comments above are from occasional observations, and old memories - so not guaranteed to be very accurate.

Regards

Jonathan Lewis
http://www.oracle.com/technology/community/oracle_ace/ace1.html#lewis

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

>>>Third, a bit of curiosity: Does the time to truncate vary
>>>with the buffer cache size? That would imply a horribly
>>>blown cache search which I certainly hope is not the case.

...hoping JL will comment, but I can recall from experience that in 8i (can't remember if R1,R2 or R3), a VLM size SGA would take forever to truncate a table as the server process had to walk all the chains to invalidate the buffers ... that smoked a single CPU for a long time on a large SGA....

I routinely use 20+ GB SGAs and have not seen that in 9i or 10g.

FWIW

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Oct 17 2006 - 16:21:02 CDT

Original text of this message

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