Database Administration (MOSC)

MOSC Banner

DBMS_STATS.gather_table_stats causing full table stats generation though INCREMENTAL stats enabled

Hi
Oracle DB version 19.11.0.0.0 on Exadata x7
We have table my_table partitioned on date column with INTERVAL partition.
Incremental stats is enabled for table.
Table has more than 225 partitions and each partition has more than 10000000 records.

SELECT dbms_stats.get_prefs('INCREMENTAL','MFR','MY_TABLE') "INCREMENTAL" FROM   dual; 
return TRUE

When we run stats with below command its generating stats for all partitions. Expectations was it will generate stats for partitions for which it is missing or data is changed.

BEGIN 
dbms_stats.gather_table_stats(ownname=>'YYY',tabname=>'MY_TABLE',estimate_percent=>dbms_stats.auto_sample_size,degree=>8,cascade=>TRUE,method_opt=>'FOR ALL COLUMNS SIZE REPEAT'); 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center