My Oracle Support Banner

The STATS on the table shows as STALE even after gathering the stats (Doc ID 2543362.1)

Last updated on JANUARY 21, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Symptoms

The STATS on the table shows as STALE even after gathering the stats.

SQL> select STALE_STATS, LAST_ANALYZED

from dba_tab_statistics s
where owner = 'XXXX'
and table_name = 'XXXX'
/


STA LAST_ANAL
--- ---------
YES 26-JUL-18

Elapsed: 00:00:00.68

SQL> exec dbms_stats.gather_table_stats(ownname=>'XXXX',tabname=>'XXXX',estimate_percent=>dbms_stats.auto_sample_size,degree=>dbms_stats.auto_degree,cascade=>TRUE);

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.16


SQL> select STALE_STATS, LAST_ANALYZED
from dba_tab_statistics s
where owner = 'BIGDATA_01'
and table_name = 'UN_MOTIVOBAJA'
/
 
STA LAST_ANAL
--- ---------
YES 26-JUL-18

Elapsed: 00:00:00.36

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.