Database Tuning (MOSC)

MOSC Banner

dba_tab_statistics stale_stats will set to "YES" direct after DML

in Database Tuning (MOSC) 5 commentsAnswered ✓

When running a DML, the dba_tab_statistics stale_stats column will be set to "YES" for the related table. it will remain to yes, also when the entire transaction was rolled back.

When I later run a DBMS_STATS.gather_schema_stats with options => 'GATHER AUTO' in an autonomous transaction the stale_stats column will set to NO.

When I later rollback may entire transaction the stale_stats column remains as NO.

from my point of view, it is a wrong behavior in Oracle 19c. Stale_stats should only go to "YES" for a table when the related transaction was committed.

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