Changing the Primary Index in the CATALOG Table - Teradata Tools and Utilities

Teradata® Archive/Recovery Utility Reference

Product
Teradata Tools and Utilities
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-06-05
dita:mapPath
fac1527114221922.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2412
Product Category
Teradata Tools and Utilities

In previous versions of Teradata ARC, CATALOG tables were created with inefficient primary indexes that sometimes caused rows to be skewed on a limited number of AMPS. To correct this, follow these steps to change the primary index of an existing catalog table.

If a new catalog table is created by Teradata ARC, these steps are not necessary.
  • Create a new catalog table with the same DDL as the existing table:
    CREATE TABLE CATALOGNEW AS CATALOG WITH NO DATA;
  • Modify the new catalog table to use the correct primary index:
    ALTER TABLE CATALOGNEW
    MODIFY PRIMARY INDEX(EVENTNUM, DATABASENAME, TABLENAME);
  • Copy all data from the existing catalog data to the new catalog table:
    INSERT INTO CATALOGNEW SELECT * FROM CATALOG;
  • Remove the existing catalog table:
    DROP TABLE CATALOG;
  • Rename the new catalog table to “CATALOG”:
    RENAME TABLE CATALOGNEW AS CATALOG;