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

Teradata Vantage™ - Database Design

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Last Update
2021-07-27
Content Type
User Guide
Publication ID
B035-1094-171K
Language
English (United States)
Last Update
2021-07-27

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).