What should you do to update statistics the most should be processed first?

You have the following requirements with respect to optimizer statistics:
The statistics should be generated automatically during weekdays (Monday to Friday) between 10:00 p.m. and 7:00 a.m.
The objects that need updated statistics the most should be processed first.
What should you do?

You have the following requirements with respect to optimizer statistics:

The statistics should be generated automatically during weekdays (Monday to Friday) between 10:00 p.m. and 7:00 a.m.
The objects that need updated statistics the most should be processed first.

What should you do?

A.
Modify the AUTO_TASKS_JOB_CLASS Scheduler class.

B.
Use the DBMS_STATS.GATHER_DATABASE_STATS procedure with the GATHER AUTO option.

C.
Modify the duration of the default WEEKNIGHT_WINDOW scheduler window to 10:00 pm.7:00 a.m.

D.
Not make any medications, because by default the WEEKNIGHT_WINDOW scheduler window automatically generates statistics during weekdays between 10:00 p.m.and 7:00 a.m.

Explanation:
A Scheduler program GATHER_STATS_PROG and Scheduler job GATHER_STATS_JOB are predefined on installation of Oracle Database. GATHER_STATS_PROG collects optimizer statistics for all objects in the database for which there are no statistics or only stale statistics. GATHER_STATS_JOB is defined on GATHER_STATS_PROG and is scheduled to run in the MAINTENANCE_WINDOW_GROUP.

The Oracle Scheduler enables you to create time windows during which jobs are automatically run. A typical Scheduler window defines a start time, a duration, and optionally a resource plan to activate. A Scheduler job can then name a window as its schedule. (When the window “opens,” the job begins to run.) In addition, windows can be combined into window groups, and if a job names a window group as its schedule instead of naming a window, the job runs whenever any of the windows in the window group opens.

Two Scheduler windows are predefined upon installation of Oracle Database:
* WEEKNIGHT_WINDOW starts at 10 p.m . and ends at 6 a.m. every Monday through Friday.
* WEEKEND_WINDOW covers whole days Saturday and Sunday. Together these windows constitute the MAINTENANCE_WINDOW_GROUP in which all system maintenance tasks are scheduled. Oracle Database uses the maintenance windows for automatic statistics collection and for some other internal system maintenance jobs .

REF: Oracle 10g Administrator Guide, 23-1



Leave a Reply 0

Your email address will not be published. Required fields are marked *