16.20 - Defining Indexes for a Table - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Fundamentals

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
zce1519094756513.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

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 Teradata Vantage™ - Database Utilities , B035-1102 .