The first column defined for any queue table must be a Queue Insertion Time Stamp (QITS) column. Each queue table has only one QITS column, and it must be defined exactly as indicated with the following attributes.
QITS_column_name TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
where QITS_column_name indicates the name you specify for the QITS column.
The precision specification is optional for the TIMESTAMP data type specification and its DEFAULT attribute, but you cannot define either with a precision value other than 6.
The QITS column is user-, not system-defined; however, the only significant option you have when defining the QITS column is its name.
- PRIMARY KEY
- Unique secondary index
- Identity column
A QITS column can be the NUPI for a table, but you should avoid following that practice. If you do not define an explicit primary index, primary key, or uniquely constrained column in the table, the QITS column becomes its primary index by default because it is the first column defined for the table.
You should select the primary index column set that best optimizes the performance of browse mode select operations on the table, just as you would for a non-queue table.
You might find it useful to define additional queue management columns for functions such as message identification or queue sequencing for your queue tables.