Re: DBMS_STATS cannot analyze clusters

From: Mladen Gogala <>
Date: Thu, 21 Apr 2011 17:57:31 +0000 (UTC)
Message-ID: <>

On Wed, 20 Apr 2011 15:33:59 -0700, Randolf Geist wrote:

> Can you tell us your database version? I couldn't reproduce on

It is, 64 bit, with CPU Oct 2010 last applied.

> happily analyzed all relevant objects including the cluster index. The
> staleness of the cluster index is determined by the staleness of any of
> the member tables of the cluster, so if at least one table is determined
> to be stale then the cluster index is also re-analyzed.
> Note that DBMS_STATS actually leaves out the CLUSTER object itself which
> is analyzed by ANALYZE but the CBO does not seem to use the statistics
> generated by ANALYZE on the cluster itself. The relevant statistics for
> some operations like NESTED LOOP joins using the cluster index in the
> inner row source are taken from the cluster index itself, so as long as
> this is analyzed that should be fine.

I had a query that didn't get the right plan until the cluster was analyzed with the ANALYZE command. Database stats is running weekly and it did analyze the tables, but it apparently didn't analyze the cluster.

Received on Thu Apr 21 2011 - 12:57:31 CDT

Original text of this message