Re: Question about stale statistics

From: joel garry <>
Date: Wed, 20 Apr 2011 09:28:42 -0700 (PDT)
Message-ID: <>

On Apr 19, 10:53 pm, Mick <> wrote:
> I am doing some investigation into stale statistics in our database.
> We are running Oracle
> Using the sql below it returns several indexes :
> from dba_ind_statistics
> order by LAST_ANALYZED
> The job GATHER_STATS_JOB has been running on our system and this
> is proven by the fact that the last_analyzed date corresponds with the
> time that this job is scheduled to run.
> If I manually gather statistics for a particular table using
> dbms_stats.gather_table_stats then the stats for that table
> no longer show as stale.
> Does this mean that the GATHER_STATS_JOB does not do all the
> work that you would expect?
> As a result of this would it be better for me to run the statistics
> manually
> myself?
> Thank You in advance.

Checked for stattype_locked in dba_tab_statistics. I see what you described on the related indices where I've locked the table statistics on the related table, though the last_analyzed was the locking date.

I'm unsure what manual gather stats does with locked statistics, I would expect it to err. You might want to look at a backup from before the manual gather - I wonder if that statistics information is in an export?

I know in the past I've stumbled over not deleting stats before getting new ones: (and people have blogged about that issue).

Ohhhh, just noticed MOS Bug 10121689: LAST_ANALYZED IN DBA_TAB_COL_STATISTICS NOT UPDATED FOR FUNCTION-BASED INDEX sounds just like what you describe, if you have an FBI. Even in and some 11's.


-- is bogus.
“I love my McJob”  - in slideshow for McDonalds hiring day.
Received on Wed Apr 20 2011 - 11:28:42 CDT

Original text of this message