Creating a materialized query table (MQT)
Use the following procedure to create a materialized query table.
- On the BMC AMI Change Manager for Db2 Main Menu, select WORKID, and press Enter.
- On the WORKID Action Menu, type the name of the WORKID or type a wildcard pattern to display a list of work IDs. Then, select Specify Db2 definitions and press Enter.
- On the Object Specification panel, specify the name of a view (or use wildcard characters) and press Enter.
- On the Mixed List panel, type E in the Act column to edit a view (VW) object, and press Enter.
- On the View Detail panel, type S to select Create Materialized Query Table based on this view, and press END.
- On the Create MQT panel, specify the information about the materialized query table (MQT).
- Type the owner of the table.
- Type the name of the table.
- Type the name of an existing database and table space.
- Specify the attributes for the table.
- Specify whether the parent table space already exists in the Db2 catalog.
- To modify the columns in the table, type S to select Table Column List.
To specify a comment for the table, type S to select Table Comment.
- Type S to select MQT Parameters.
On the Create MQT Parameters panel, specify the parameters for the MQT.
Parameter
Action
Maintained By
Type SYSTEM or USER.
Query Optimize
Type one of the following:
- ENABLE to specify that the table can be used to optimize queries.
- DISABLE to specify that the table cannot be used to optimize queries.
MQT has Explicit Column List
Type Y or N
- To edit the text for the MQT , type S to select MQT Text
- To specify columns for the MQT, type S to select MQT Column List
- To edit the schema path, type S to select Schema Path
- To view the old text for the MQT , type S to select Old MQT Text
Press END.Now that the MQT has been created you can analyze a work ID and execute a worklist.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*