Row ordering on each AMP by a single NUSI column: either value-ordered or hash-ordered.
If you specify HASH, the rows are hash-ordered on the AMP. Otherwise, the rows are value-ordered.
Each multicolumn NUSI created with an ORDER BY clause counts as two consecutive indexes against the maximum of any mix of 32 secondary, hash, and join indexes that can be defined per table. This includes the system-defined secondary indexes used to implement PRIMARY KEY and UNIQUE constraints for nontemporal tables and the single-table join indexes used to implement PRIMARY KEY and UNIQUE constraints for temporal tables. For details, see Teradata Vantage™ - Temporal Table Support , B035-1182 . See the CREATE INDEX topic “Why Consecutive Indexes Are Important For Value-Ordered NUSIs” Teradata Vantage™ - SQL Data Definition Language Detailed Topics , B035-1184 .
If you do not specify an ORDER BY clause, the system automatically hash orders index rows on their columns.
You cannot order by the system-derived PARTITION or PARTITION#L n columns. However, you can specify a user-defined column named partition.
You can order by HASH on a UDT column, but not by VALUE.
ORDER BY is not applicable to geospatial indexes.
- VALUES
- Value-ordering for the ORDER BY column.
- HASH
- Hash-ordering for the ORDER BY column.
- order_column_name
- Column in the index_column_name list that specifies the sort order to be used.