Replacing a data mart

You can replace a data mart to update the data mart definition. You create a new data mart with a new definition and drop the original data mart. Query acceleration continues uninterrupted.

Before you begin

You need enough disk space to contain both data marts until you drop the original data mart.

About this task

Update the data mart definition when you make the following types of schema modifications to the data warehouse:

  • Rename tables
  • Rename columns
  • Alter tables to add or drop columns
  • Change the data types of the columns
  • Add or drop constraints

Query acceleration runs on the original data mart until the new data mart is loaded. As soon as the new data mart is loaded, the database server uses the new data mart for matching new queries to AQTs.

Procedure

To replace a data mart:
  1. Optional: Create a data mart definition manually.
  2. Create the new data mart.
  3. Load the new data mart.
    Candidate queries that are sent to the accelerator server use the new data mart.
  4. Enable trickle feed for the new data mart.
  5. If trickle feed is enabled for the original data mart, disable it.
  6. Drop the original data mart.

Example

This example shows how to replace a data mart after the new data mart definition is stored in the stores_marts database. The original data mart is named customermart1 and the new data mart is named named customermart2. The following statements create the new data mart, load the new data mart, enable trickle feed for the new data mart, disable trickle feed for the original data mart, and drop the original data mart:
EXECUTE FUNCTION ifx_createMart('MyAccelerator', 'customermart2', 'stores_marts');

EXECUTE FUNCTION ifx_loadMart(('MyAccelerator', 'customermart2', 'MART');

EXECUTE FUNCTION ifx_setupTrickleFeed('MyAccelerator', 'customermart2', 5);

EXECUTE FUNCTION ifx_removeTrickleFeed('MyAccelerator', 'customermart1');

EXECUTE FUNCTION ifx_dropMart('MyAccelerator', 'customermart1');