Neoview SQL Reference Manual (R2.3)

MAINTAIN Command
“Syntax Description of MAINTAIN”
“Examples of MAINTAIN”
The MAINTAIN command performs one or more table maintenance tasks, such as REORG,
UPDATE STATISTICS, and REFRESH, on a specified database object. The MAINTAIN command
provides support:
For users to specify one or more maintenance tasks for a specific object.
For specifying a specific maintenance task for a particular object.
To synchronously return status information as each task is executed.
To perform tasks in parallel when it makes sense to do so.
To continue object maintenance in the case of an error.
Enable and disable tasks.
The four forms of the MAINTAIN command are:
MAINTAIN INDEX command
MAINTAIN MV command
MAINTAIN MVGROUP command
MAINTAIN TABLE command
Not all tasks and options are available for each object type. The syntax for each object type is
presented here.
Syntax Description of MAINTAIN
MAINTAIN object-type object-name,
[,maintain-task [task-options]...]
[, other-options...][,control-options]
object-type is:
TABLE
INDEX
MVGROUP
MV
maintain-task is:
ALL
REORG
REORG ALL INDEXES
UPDATE STATISTICS
UPDATE STATISTICS ALL MVS
REFRESH
REFRESH ALL MVS
REORG ALL MVS
REORG ALL MVS INDEXES
other-options is:
CONTINUE ON ERROR
STOP ON ERROR
RETURN DETAIL STATUS
DISPLAY
DISPLAY DETAIL
control-options is:
ENABLE
DISABLE
The MAINTAIN statement performs all or a subset of tasks for a specific object. The order of
execution depends on the natural order of tasks. The command could also be used to perform
all tasks for a particular object type.
192 SQL Utilities