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: GLOBAL_STATS

Re: GLOBAL_STATS

From: Christian Antognini <christian.antognini_at_trivadis.com>
Date: Wed, 13 Oct 2004 14:34:57 +0200
Message-ID: <416d2110@post.usenet.com>

Hi Martin

> after some CTAS-operations on my Oracle 10.1.0.2 Server (SE) i see
> that there are many entries in user_tables with GLOBAL_STATS = 'NO'.
> The database reference tells me:
>
> GLOBAL_STATS:
> For partitioned tables, indicates whether statistics were collected
> for the table as a whole (YES) or were estimated from statistics on
> underlying partitions and subpartitions (NO)

Only DBMS_STATS, except in old versions where in some situations ANALYZE is used, generates global statistics. ANALYZE always generate non-global statistics. This is true for non-partitioned tables as well, even if it makes no sense to speak about global statitics in this case...

> Since these tables are not partitioned (the feature is not included in
> SE) i have no idea how they got the flag.

Be carefull, internally, in SE 10g, the partitioning options is used. An example is AWR...

> The problem is that the
> tables seem to be excluded from the automatic statistic gathering.

Mhmm... if accoring to all_tab_modifications at least 10% of the rows has changed or a truncate has been performed, the statistics, in a default configuration, are automatically gathered. Of course if you changed something in the config... the automatic feature can eventually be disabled...

> IS it possible to change the GLOBAL_STATS-flag? (i didn't find a fitting
> ALTER TABLE command)

No. There's no such statement.

> Or have i to use dbms_stats now to get the
> statistics?

Yes. This is the only way to do it.

> And what's the reason for the GLOBAL_STATS='NO'-entries
> for non-partitioned tables?

As I wrote before, ANALYZE is used.

Chris

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Received on Wed Oct 13 2004 - 07:34:57 CDT

Original text of this message

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