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: analyze index

Re: analyze index

From: Richard Foote <richard.foote_at_bigpond.nospam.com>
Date: Wed, 26 Jan 2005 11:28:32 GMT
Message-ID: <A9LJd.135384$K7.133006@news-server.bigpond.net.au>


<xhoster_at_gmail.com> wrote in message
news:20050125160438.340$4R_at_newsreader.com...

> "Richard Foote" <richard.foote_at_bigpond.nospam.com> wrote:

>> "Holger Baer" <holger.baer_at_science-computing.de> wrote in message
>> news:ct4udr$d3p$1_at_news.BelWue.DE...
>> > Oradba Linux wrote:
>> >> Why would analyze index command read table segments?
>> >>
>> >>
>> >
>> > Because it has to?
>> >
>> > Or how should it be able to determine the clustering_factor?
>> >
>>

>> Hi Holger
>>

>> Actually, it doesn't need to visit the table in order to calculate the CF
>> as it has all the info it needs within the rowids contained in the index.
>>

>> Basically, as it reads through the rowids in the leaf pages, if the block
>> id (or of course file no) changes from one index entry to the next, the
>> CF is incremented. If consecutive index entries point to the same block,
>> the CF is not incremented.
>
> Hi Richard,
>
> This reminds me of something I've been wondering for a while.
> Do you think this is the best way for them to compute cluster factors?
> If the table blocks pointed to by an index block (in index order) looked
> like this (just to carry things to the extreme):
>
> 1,2,1,2,1,2,1,2,1,2,1,2,1,2
>
> vs this,
>
> 1,1,1,1,1,1,1,2,2,2,2,2,2,2
>
> They would get very different cluster factors, but it seems like they
> are both very well clustered.
>

Hi Xho

That's a very good point you make. Some random comments I would make are:

...
1,2,3,4,6,7,8,9,1,2,3,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,8,9,1,2,3,4,6,7,8,9 ...

It might have quite an awful CF overall, however, there may be pockets within the index that has a good CF (eg. the section that points to block 5 where such a query would be relatively "efficient").

Hope it all makes sense !!

Cheers

Richard Received on Wed Jan 26 2005 - 05:28:32 CST

Original text of this message

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