Maintain Mvgroup; Examples Of Maintain - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

internal settings to determine if a REORG operation is necessary. If you specify OVERRIDE, as
the following example shows, ESAM skips the internal settings and initiates a REORG operation:
MAINTAIN TABLE t1, REORG ', OVERRIDE';

MAINTAIN MVGROUP

MAINTAIN MVGROUP mvgroupname, REFRESH 'mv-refresh-option'
mv-refresh-option is:
[RECOMPUTE | CANCEL]
[{WITH | WITHOUT |DO ONLY} MVLOG CLEANUP]
mvgroupname
is the ANSI name of the materialized view group to be maintained. It can be a one or two-part
name. See
The REFRESH utility can be applied to both incremental materialized views (materialized
views) and recomputed materialized views. The REFRESH utility optimizes the refresh of
MVGROUP.
NOTE:
time into one group and refresh them together.
If for any reason the refresh of some materialized views in the MVGROUP fails, the utility
reports the failures. In case of partial failure, you can refresh either the whole materialized
view group or specific materialized views again. If the base tables did not change since the
last attempt to refresh, no performance penalty is incurred. In an environment where updates
happen continuously, the second refresh affects all the materialized views. Refreshing
individual materialized views out of group context might lead to a state where different
materialized views in the group are not in sync with each other.
RECOMPUTE
when used, the materialized views in the MVGROUP are cleared and repopulated from
scratch. Contrast this with incremental refresh when the RECOMPUTE option is not used.
In this case, only changes since the last refresh are applied.
CANCEL
helps recover from failure situations. In certain cases, reissuing the MAINTAIN operation
may not work (for example, when the system has a disk space issue and the MAINTAIN
operation keeps failing due to insufficient disk space). In such a case, the operation is canceled,
and resources are freed up until the bigger issue is resolved.
MVLOG CLEANUP
gives you control over cleaning the table logs from entries that are no longer needed. The
default option is WITH MVLOG CLEANUP, where the logs are cleaned at the end of the refresh.
If you want to run the log cleanup outside the refresh window, specify WITHOUT MVLOG
CLEANUP and invoke the utility again with DO ONLY MVLOG CLEANUP outside the refresh
window. This option gives you control over when you clear the logs.
Note that if an ON REQUEST MV is not refreshed, the data in the log tables of the base table
is accumulated and cannot be cleaned up. This is also true for ON REQUEST MVs that were
created but not yet initialized.
For additional information on materialized views, see
Statement" (page

Examples of MAINTAIN

Displays all tasks that are done on table t1_090:
"Database Object Names" (page
HP recommends that you gather all the materialized views to refresh at a specific
63).
242).
"CREATE MATERIALIZED VIEW
MAINTAIN Command
217

Advertisement

Table of Contents
loading

Table of Contents