15.10 - INDEX - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
December 2015
Programming Reference

Keyword that defines a nonunique secondary index (NUSI) for the table.

You can define a secondary index on a column that has a UDT data type.

You can define a nonunique secondary index on a column that has a Geospatial data type.

If you specify INDEX without the preceding keyword UNIQUE, the index is a nonunique secondary index (NUSI).

The INDEX list is an extension to ANSI SQL.

Unlike the indexes created by the UNIQUE and PRIMARY KEY constraint definitions, indexes defined by the index list can have nullable columns.

You cannot define a secondary index on a column defined with any of the following data types:
  • BLOB
  • CLOB
  • JSON
  • XML
  • Period
Optional name for the index.
For information about naming database objects, see SQL Fundamentals, B035-1141.
Ignore the assigned case specificity for a column. This property enables a NUSI defined with the ALL option to do the following:
  • Include case-specific values.
  • Cover a table or join index on a NOT CASESPECIFIC column set.
ALL enables a NUSI to cover a query, enhancing performance by eliminating the need to access the base table itself when all columns needed by a query are contained in the NUSI.
Be aware that specifying the ALL option might also require additional index storage space.
You cannot specify multiple NUSIs that differ only by the presence or absence of the ALL option.
You cannot specify the ALL option for primary or unique secondary indexes.
Column set whose values are to be used as the basis for a secondary index.
Columns in the list cannot have any of the following data types: Period, Geospatial, JSON, XML, BLOB, or CLOB.
If you specify more than one column name, the index is created on the combined values of each column named. A maximum of 64 columns can be specified for an index, and a maximum of 32 secondary indexes can be created for one table.