Alter Materialized View Statement; Syntax Description Of Alter Materialized View; Considerations For Alter Materialized View - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

ALTER MATERIALIZED VIEW Statement

"Syntax Description of ALTER MATERIALIZED VIEW"

"Considerations for ALTER MATERIALIZED VIEW"

"Example of ALTER MATERIALIZED VIEW"
The ALTER MATERIALIZED VIEW statement changes a materialized view.
ALTER {MATERIALIZED VIEW | MV} name mv-alter-action
mv-alter-action is:
MVATTRIBUTES[S] mv-attribute
| {ADD | REMOVE} IGNORE CHANGES ON simple-table [,simple-table]...
| RENAME TO new-name [CASCADE]
mv-attribute is:
COMMIT REFRESH EACH n-rows
Syntax Description of ALTER MATERIALIZED VIEW
name
specifies the current name of the object. See
IGNORE CHANGES ON
instructs the refresh operation of a materialized view over several base tables to ignore the
changes to the listed base tables. This clause is applicable only to ON REQUEST MAJVs and
ON REQUEST MJVs. Make sure at least one table in the FROM clause of the materialized
view is not included in the IGNORE CHANGES ON clause. Also, only base tables from the
FROM clause of the materialized view can appear in the IGNORE CHANGES ON clause.
The IGNORE CHANGES ON list cannot include materialized views.
RENAME TO new-name [CASCADE]
changes the logical name of the object within the same schema.
new-name
specifies the new name of the object after the RENAME operation occurs.
CASCADE
specifies that indexes and constraints on the renamed object will be renamed.
COMMIT REFRESH EACH n-rows
n-rows refers to the number of rows that refresh processes from the log before committing
a transaction and starting another one. There is no recommended value for n-rows, but the
number must be less than 5000. The default value is zero (0), which means that the entire
refresh for the materialized view is done in one transaction.
For descriptions of other options in the syntax, see the
Statement" (page
Considerations for ALTER MATERIALIZED VIEW
MVATTRIBUTES is used by refresh to determine the number of rows that should be refreshed
per transaction. This attribute is not valid for MJVs. IGNORE CHANGES is used by refresh to
ignore the updates performed to the base tables that are specified in the IGNORE CHANGES
list.
A base table of the materialized view can be added to the IGNORE CHANGES list by altering
the materialized view using the ADD IGNORE CHANGES ON clause. Using ALTER
MATERIALIZED VIEW to add ignore changes on a base table will be successful only if all the
updates to the base table up to that point are propagated to the materialized view by using
REFRESH. If there are updated rows on a base table that are not used by REFRESH to update
40
SQL Statements
63).
"Database Object Names" (page
"CREATE MATERIALIZED VIEW
242).

Advertisement

Table of Contents
loading

Table of Contents