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: Checking the rebuildability of an index

RE: Checking the rebuildability of an index

From: <Ivan_Rivera_at_doh.state.fl.us>
Date: Wed, 07 Aug 2002 06:58:30 -0800
Message-ID: <F001.004AD7AF.20020807065830@fatcity.com>


I am no way in any of yous league (which means I am most likely wrong) but I am trying to understand this one here and I'd have to agree with Jared on this one over Tom Kyte. I'm not sure if the behavior has changed in 9i but in the ILT Course book for the DBA class in chapter 13 Maintaining Indexes under the section "Effect of DML Operations on an Index" the second bullet reads

"Deleting a row results only in a logical deletion of the index entry. The space used by the deleted row is not available for new entries until all the entries in the block are deleted."

If this is true then Jared is right on point and also correct when saying that's why there is no PCTUSED with indexes. And it also explains why PCTFREE works different when dealing with table data blocks as opposed to how it works with index data blocks. If this is wrong can someone please explain why. Thanks. Ivan

-----Original Message-----
Sent: Wednesday, August 07, 2002 6:03 AM To: Multiple recipients of list ORACLE-L

Jared,
I think Tom's spot on here.
Index blocks aren't available for reuse in a different part of the tree until the block is completely empty BUT space released by deletions can be reused by subsequent inserts so long as the entry is in the correct key range.

regards,
Mike Hately
(OCP 7.3,8,8i,9i)

-----Original Message-----
Sent: 06 August 2002 23:14
To: Multiple recipients of list ORACLE-L

Hmmm.

Though Tom Kyte is usually right on the money, the following statement from the article is questionable:



But, the index on ename -- that's a little more chaotic. Say we have employees:

Bill
Bob
Mary

Say we fire Bob, now we have:

Bill
X-Bob (deleted entry)
Mary
Should we rebuild an index like that? Probably NOT, the reason -- we are going
to hire Hillary:

Bill
Hillary
Mary

Hillary will reuse Bobs slot. There is no reason to get rid of that slot
--

only to have to rebuild it again later. If the data you are indexing has a good
probability of reusing a slot like that -- rebuilding can actually slow you down
over time (it takes time to split a block -- with empty entries -- the chances
we need to split are reduced. If you rebuild -- they'll go up -- you unsplit
everything, got rid of the space. Now we have to re-split again -- every time
you rebuild). I find most indexes hit a steady state -- if you rebuild them,
they'll go back into that state over time. So rebuilding is somewhat self

defeating in that case.


Hillary may reuse Bob's slot in a table data block, if the deletion of Bob puts
the block back on the freelist.

Indexes do not use the same concept of a freelist, which is why they do not
have a PCTUSED parameter. Index blocks are not reused until the entire block is empty. The only time that Hillary's record could reuse Bob's slot
in the ENAME index is if Bob's record was the only index entry in that block
of the ENAME index.

Jared  



This email and any attached to it are confidential and intended only for the individual or
entity to which it is addressed. If you are not the intended recipient, please let us know
by telephoning or emailing the sender. You should also delete the email and any attachment
from your systems and should not copy the email or any attachment or disclose their content
to any other person or entity. The views expressed here are not necessarily those of
Churchill Insurance Group plc or its affiliates or subsidiaries. Thank you. Churchill Insurance Group plc. Company Registration Number - 2280426. England.
Registered Office: Churchill Court, Westmoreland Road, Bromley, Kent BR1 1DP.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Hately Mike
  INET: Mike.Hately_at_churchill.com

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: ListGuru_at_fatcity.com (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).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Ivan_Rivera_at_doh.state.fl.us

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: ListGuru_at_fatcity.com (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). Received on Wed Aug 07 2002 - 09:58:30 CDT

Original text of this message

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