Materialized query tables and query performance

One way to improve the performance of dynamic queries that operate on very large amounts of data is to generate the results of all or parts of the queries in advance, and store the results in materialized query tables.

Begin program-specific programming interface information. Materialized query tables are user-created tables. Depending on how the tables are defined, they are user-maintained or system-maintained. If you have set subsystem parameters or an application sets special registers to tell Db2 to use materialized query tables, when Db2 executes a dynamic query, Db2 uses the contents of applicable materialized query tables if Db2 finds a performance advantage to doing so. End program-specific programming interface information.