Neoview SQL Reference Manual (R2.2)
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
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
object-name
specifies the ANSI name of the object to be maintained. It can be a one or two-part name.
REFRESH MVS
refreshes all materialized views on the specified table.
182 SQL Utilities