16.10 - Defining Indexes for a Table - Teradata Database

Teradata Database SQL Fundamentals

Product
Teradata Database
Release Number
16.10
Published
June 2017
Content Type
Programming Reference
Publication ID
B035-1141-161K
Language
English (United States)
Last Update
2018-04-25

An index is a physical mechanism used to store and access the rows of a table. When you define a table, you can define a primary index or primary AMP index and one or more secondary indexes.

If you define a table and you do not specify a PRIMARY INDEX clause, PRIMARY AMP [INDEX], NO PRIMARY INDEX clause, PRIMARY KEY constraint, UNIQUE constraint, or PARTITION BY, the default behavior is for the system to create the table using the first column as the nonunique primary index. (If you prefer that the system creates a table without a primary or a primary AMP index, use DBS Control to change the value of the PrimaryIndexDefault General field.

If the PARTITION BY clause is specified without specifying a PRIMARY INDEX, PRIMARY AMP [INDEX], or NO PRIMARY INDEX clause, the default is NO PRIMARY INDEX regardless of the setting of this field or whether a PRIMARY KEY or UNIQUE clause is specified.

Related Topics

For details on indexes, see “Indexes.” For details on NoPI tables, see “No Primary Index (NoPI) Tables."

For details about creating a table without a primary or a primary AMP index, and using DBS Control to change the value of the PrimaryIndexDefault General field, see Utilities , B035-1102 .