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" (page 44)
"Considerations for ALTER MATERIALIZED VIEW" (page 44)
The ALTER MATERIALIZED VIEW statement changes a materialized view.. See
Object Names" (page
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
RENAME 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.

Considerations for ALTER MATERIALIZED VIEW

As in regular tables, materialized view tables have attributes. Most of the attributes that are valid
for regular tables are also valid for materialized views. In addition, materialized view tables have
specific attributes, which are MVATTRIBUTES and IGNORE CHANGES.
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
rows in the materialized view, an error will occur that indicates a REFRESH needs to be performed
before altering the materialized view to add IGNORE CHANGES on the base table. Only a base
table that is in the FROM clause of the query expression of the materialized view can be added
to the IGNORE CHANGES list. A base table of the materialized view that is already in the
IGNORE CHANGES list can be removed from the IGNORE CHANGES list by altering the
materialized view using the REMOVE IGNORE CHANGES ON clause.
44
SQL Statements
196).
"Database Object Names" (page
"Database
196).

Advertisement

Table of Contents
loading

Table of Contents