1.

In Db2, how can one create MQT?

Answer»

To CREATE and MAINTAIN an MQT is a two-step process.

First, we NEED to create an MQT based on the needs of the business logic, and then refresh the data in the MQT table.

Below is an example

CREATE TABLE SALES_MQT AS (SELECT SUM (AMOUNT) AS TOTAL_SUM, DATE FROM SALES GROUP BY DATE) DATA INITIALLY DEFERRED REFRESH DEFERRED; REFRESH TABLE SALES_MQT;


Discussion

No Comment Found