Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: analyze index
"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 Howard,
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.
Cheers,
Xho
-- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service $9.95/Month 30GBReceived on Tue Jan 25 2005 - 14:48:39 CST