Database Administration (MOSC)

MOSC Banner

12cR2 manual gather stats

edited Jun 18, 2019 5:05AM in Database Administration (MOSC) 5 commentsAnswered ✓

1. Any difference between the below 2 manual execution?

I believe both will gather stats for both stale and empty statistics (and based on prefs setting).

-> exec DBMS_AUTO_TASK_IMMEDIATE.GATHER_OPTIMIZER_STATS;

-> exec DBMS_STATS.GATHER_DATABASE_STATS (options => 'GATHER AUTO');

Asking this as i notice that option one will take longer to complete.

2. Does the above include gathering dictionary stats and fixed objects with stale and empty stats?

I believe so due to AUTOSTATS_TARGET=AUTO. But need confirmation on this.

Output of get_prefs:

Automatic Stats Gathering Job - Parameters

==========================================

AUTOSTATS_TARGET: AUTO

CASCADE: DBMS_STATS.AUTO_CASCADE

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