index - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-22
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantageā„¢

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
  • LOB UDT
  • VARIANT_TYPE
  • ARRAY
  • VARRAY
  • Period
  • XML
  • JSON
  • DATASET
index_name
Optional name for the index.
For information about naming database objects, see Teradata Vantageā„¢ - SQL Fundamentals, B035-1141.
ALL
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.
index_column_name
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: BLOB, CLOB, Period, XML, Geospatial, JSON, or DATASET.
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.