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: How do we know that an index need to be rebuilt.

Re: How do we know that an index need to be rebuilt.

From: Mladen Gogala <mgogala_at_adelphia.net>
Date: Sun, 21 Sep 2003 22:44:48 -0800
Message-ID: <F001.005D0A1D.20030921224448@fatcity.com>


Oracle indexes do not need rebuilding on the regular basis, but only as an exceptional event. The warning sign is when queries that utilize nested loops slow down without any apparent reason. The only case when index needs to be rebuilt is the case of a table with frequent delete operations. You should consider rebuilding indexes if and only if the base table satisfies that crieria. How to decide? There are few rules of thumb, none satisfactory and decisive. I usually compare the number of blocks in the index with the number of blocks in the table. If the number of blocks in the index exceeds 50% of those in the table, the index is a candidate for rebuilding. How did I come to 50%? I have no clue. That value popped up at one of my previous jobs and I still use it, when I want to rebuild indexes. One of the most frequent reasons for index rebuilding is a magazine reading boss who has read that indexes need rebuilding. A script which rebuilds based on a criteria like 50% of the number of blocks usually satisfies damagement, especially if accompanied by a 3-page MS-Word document explaining this hocus-pocus in detail. Picture of a B*-tree scanned from N. Wirth's "Data Structures+Algorithms = Programs" is a mandatory requirement for such documents.

On 2003.09.22 01:59, Veeraraju_Mareddi wrote:
> Dear Friends,
>
> Can somebody tell me how do we that an index needs to be rebuilt.. Different
> scenarios / any documents will be helpful.
>
> Thanks in advance.
> Rajuvera
> **************************************************************************
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **************************************************************************
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Veeraraju_Mareddi
> INET: rajuveera_at_satyam.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> 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).
>

--
Mladen Gogala
Oracle DBA
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: mgogala_at_adelphia.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Mon Sep 22 2003 - 01:44:48 CDT

Original text of this message

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