Queries that are eligible for rewrite

Db2 supports automatic query rewrite only for read-only, dynamic queries that do not contain parameter markers. Db2 cannot automatically rewrite statically bound queries.

Begin program-specific programming interface information. You can always refer to a materialized query table explicitly in a statically bound query or in a dynamically prepared query. However, you should consider updating materialized query table data more frequently if you frequently query the table directly. Also, allowing users to refer directly to materialized query tables reduces an installation's flexibility of dropping and creating materialized query tables without affecting applications.End program-specific programming interface information.