The following restrictions apply to secondary indexes.
- Teradata Database tables can have up to 32 secondary, hash, and join indexes.
This includes the system-defined secondary indexes used to implement PRIMARY KEY and UNIQUE constraints.
Each multicolumn NUSI that specifies an ORDER BY clause counts as two consecutive indexes in this calculation (see Importance of Consecutive Indexes for Value-Ordered NUSIs).
You cannot define secondary indexes for a global temporary trace table. See “CREATE GLOBAL TEMPORARY TRACE TABLE” in SQL Data Definition Language.
- No more than 64 columns can be specified for a secondary index definition.
- You can include UDT columns in a secondary index definition.
- You cannot include columns having XML, BLOB, CLOB, BLOB-based UDT, CLOB-based UDT, XML-based UDT, Period, JSON, ARRAY, or VARRAY data types in any secondary index definition.
You can define a simple NUSI on a geospatial column, but you cannot include a column having a geospatial data type in a composite NUSI definition or in a USI definition.
- You can include row-level security columns in a secondary index definition.
- You cannot include the system-derived PARTITION or PARTITION#L n columns in any secondary index definition.