Refreshing all the data in a data mart

You can refresh all the data in a data mart while queries are being accelerated by creating a new data mart based on your existing data mart definition. You do not need to suspend query acceleration in order to drop and re-create the original data mart.

About this task

To refresh the data-mart data, create a new data mart. As soon as the new data mart is loaded, the database server uses the new data mart for matching new queries to AQTs. New candidate queries that are sent to the accelerator server will use the new data mart.

Drop the original data mart and deploy and load the new data mart. The new and old data marts must have the same data mart definition, but different names.

If you have enough memory, you can create the new data mart and then drop the original data mart. During the load phase, you need approximately twice as much memory as the original data mart uses. Otherwise, drop the original data mart and then recreate it. Make sure you save the data mart definition file with a different file name before you drop the original data mart.

In this example, datamart_1 has been loaded and sent to the accelerator server for processing. The data for datamart_1 has changed. You want any new queries that are sent to the database server to use the new data.

Procedure

  1. Create a data mart that has the same definition as datamart_1, but name the data mart datamart_2.
  2. Load datamart_2. When the data loading for datamart_2 completes, the accelerator server uses datamart_2 with the refreshed data for incoming queries.
  3. Disable datamart_1.
  4. Optional: Drop datamart_1. When multiple data marts use the same tables, the Informix® database server uses the latest data mart to accelerate the queries.