Neoview Database Administrator's Guide (R2.4)
Scheduling Automated UPDATE STATISTICS and REORG
SCHEDULE Command
The SCHEDULE command enables you to display or modify the time during which the
MAINTENANCE tasks are run by the scheduler. The SCHEDULE command with the
MAINTENANCE task option is used by automated UPDATE STATISTICS to allocate the
maintenance time between the UPDATE STATISTICS and MAINTAIN (REORG) operations.
Syntax
SCHEDULE { LIST MAINTENANCE }
| { MAINTENANCE [AT time] MAXRUNTIME interval [MINUTES | MINS]
[ MAXREORGSLICE {percentage}% ] }
time is: hh:mm:ss
LIST MAINTENANCE
The LIST MAINTENANCE option displays information about the MAINTENANCE tasks.
MAINTENANCE
The MAINTENANCE option allows you to modify the time at which the task needs to be
run by the scheduler on a daily basis. This option also allows you to specify the maximum
runtime limit and the maximum REORG slice.
AT time
is the time in hh:mm:ss, in 24-hour clock notation, where hh represents the hour, mm represents
minutes, and ss represents seconds at which the scheduler runs automated UPDATE
STATISTICS and REORG tasks on a daily basis. By default, the time is 00:00:00 (midnight).
MAXRUNTIME interval [MINUTES | MINS]
is an interval specified in minutes during which automated UPDATE STATISTICS and
REORG operations occur. By default, the interval is 360 minutes (or six hours).
MAXREORGSLICE {percentage}%
is a value from 0 to 100 expressed as a percentage of the interval time during which the
automated MAINTAIN (REORG) operation runs. If you do not specify MAXREORGSLICE,
the default percentage value for REORG is 50%.
Considerations
• In the NCI interface, you must enter the SCHEDULE command on one line. The command
does not require an SQL terminator.
• In NCI, you can execute the command in SQL or NS mode.
• Automated REORG operations are first performed on the list of tables specified for automated
UPDATE STATISTICS (by the CHG_AUTO_LIST() stored procedure) and then performed
on the rest of the database tables.
• Automated UPDATE STATISTICS does not start new UPDATE STATISTICS or REORG
operations beyond the maintenance window. However, some UPDATE STATISTICS and
REORG operations might run beyond the end of the window.
Examples
• This command alters the next run time for the MAINTENANCE task:
SQL>schedule MAINTENANCE at 19:14:15
Next run : 30NOV07 19:14:08
Max runtime : 214 minutes
State : Enabled
110 Automating Update Statistics and Reorganize Operations