17.10 - Primary Index Defaults - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Database Design

Advanced SQL Engine
Teradata Database
Release Number
July 2021
English (United States)
Last Update

You should always explicitly specify a primary index, a primary AMP index, or explicitly specify no primary index for your tables. If you don’t, a default is used which might not be appropriate for the object.

Vantage never creates a partitioned PI or NoPI by default and never creates a PA by default

Use the PrimaryIndexDefault field in DBS Control to determine whether Vantage automatically creates a table with a PI or NoPI if the table is created without the PRIMARY INDEX, PRIMARY AMP INDEX, and NO PRIMARY INDEX clause. For more information on the PrimaryIndexDefault field, see Teradata Vantage™ - Database Utilities, B035-1102.

Problematic Selection of a Primary [AMP] Index Column Set

When the selection of a PI or PA column set is problematic, consider either of the following possible solutions.
  • Specify NO PRIMARY INDEX when you create the table.

    You can load rows into a NoPI table while you continue to determine an appropriate PI or PA. Such a table is sometimes referred to as a sandbox or staging table.

  • Use an identity column as the PI for the table (see Surrogate Keys).