E Archiving the TDATAMAPSEG Table

When importing data, the mapping used to transform data is archived in the TDATAMAPSEG table for each point of view (POV). If you use a large number of maps, this table grows in size over a period of time and can create a performance issue during the data import process. To improve performance, archive the data from the TDATAMAPSEG table.

In release 11.1.1.2.4.220, a new view TDATAMAPSEG_ALL is available. This view is used by the user interface to display the mappings.

You can modify the view definition to include the TDATAMAPSEG and ARCHIVE tables. Below are sample script sets that show you how to archive the data, create an index, and create view in the Oracle database.

/* Archive the existing table */
RENAME TDATAMAPSEG TO TDATAMAPSEG_ARCHIVE1
;
/*Create index*/
CREATE INDEX TDATAMAPSEG_N1 ON TDATAMAPSEG (DATAKEY)
;
CREATE INDEX TDATAMAPSEG_N2 ON TDATAMAPSEG (PARTITIONKEY, CATKEY, PERIODKEY) 
;
/* Create a new table */
CREATE TABLE TDATAMAPSEG
AS
SELECT *
FROM TDATAMAPSEG_ARCHIVE1
WHERE 1=2
;
/* Drop existing view */
DROP VIEW TDATAMAPSEG_ALL
;
/* Create a view which is UNION of base table and archive table */
CREATE VIEW TDATAMAPSEG_ALL AS 
SELECT * FROM TDATAMAPSEG
UNION ALL
SELECT * FROM TDATAMAPSEG_ARCHIVE1
;
/* Create a new table */
CREATE TABLE TDATAMAPSEG
AS
SELECT *
FROM TDATAMAPSEG_ARCHIVE1
WHERE 1=2
;

A similar process can be used for the SQL Server. Multiple archive tables can be created over a period of time and the view can be modified as needed.