Tuesday, January 13, 2009

Auto statistics collection in 10gR1 and 10gR2

We all know that Oracle Database 10g introduces the new automatic optimizer-statistics collection feature. Oracle automatically creates a database job, GATHER_STATS_JOB, and Oracle Scheduler automatically schedules the job to run during the maintenance window.
The Scheduler runs this job when the maintenance window is opened. By default, the maintenance window opens every night from 10 P.M. to 6 A.M. and all day on weekends.

But do you know there is something different between Oracle Database 10gR1 and 10gR2 ?
In 10gR1, the GATHER_STATS_JOB continues until it finishes, even if it exceeds the allocated time for the maintenance window.
http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10752/stats.htm#40674

In 10gR2, the GATHER_STATS_JOB stops when the maintenance window closes.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282

No comments: