12cR2 manual gather stats
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