Altering materialized query tables

You can use the ALTER TABLE statement to change a materialized query table to a base table, or to change the attributes of a materialized query table.

Materialized query tables enable Db2 to use automatic query rewrite to optimize queries. Automatic query rewrite is a process that Db2 uses to examine a query and, if appropriate, to rewrite the query so that it executes against a materialized query table that has been derived from the base tables in the submitted query.

Start of changeYou can also use the ALTER TABLE statement to register an existing table as a materialized query table. For more information, see Registering an existing table as a materialized query table.End of change