The primary index.
The primary index is used by the hashing algorithm to partition table rows across the AMPs.
Queue tables cannot be NoPI tables nor can they have a partitioned primary index.
If no primary index is specified, then Vantage assigns one implicitly, using the following guidelines to determine which column set is to be defined as the primary index.
- If you do not specify a primary index, but do specify a PRIMARY KEY constraint, then the implicitly defined primary index is the primary key for the table.
- If you do not specify a primary key, but do specify a UNIQUE constraint, then the implicitly defined primary index is the first UNIQUE constraint defined for the table.
- If you do not specify either a PRIMARY KEY constraint or a UNIQUE constraint, then the implicitly defined primary index is the QITS column.
In this case, the primary index is nonunique by default and cannot be defined with a unique constraint or as a USI.
The reason for this restriction is that timestamp values can repeat and therefore cannot be assumed to be unique.
- UNIQUE
- The named column must be unique.
- primary_index_column
- A column in the column set whose values are to be used as the basis for a primary index.