Populating Materialized Query Tables
You can populate user-maintained MQTs using triggers, insert operations, or the LOAD, IMPORT, and DPROPR utilities. When performing the initial population of a user-maintained MQT, you can avoid logging overhead by using the LOAD or IMPORT utilities. The following steps represent a typical approach for populating a user-maintained MQT:
1. | Make the base tables read only to avoid the creation of new records or changes to existing records. |
2. | Extract the required data from the base tables and write it to an external file. |
3. | Import or load the data from the external file into the MQT. You can use the LOAD or IMPORT utilities on a table in CHECK PENDING NO ACCESS state.
NOTE If you want to populate the MQT with ... |
Get DB2® Version 8: The Official Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.