Required Keyword & Column Identifier | CREATE TABLE | VantageCloud Lake - QUEUE Keyword and Column Identifier - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

QUEUE Keyword

Each queue table you define must stipulate the keyword QUEUE as 1 of the CREATE TABLE options following the table name; otherwise, the table you define does not have the properties associated with queue tables and you cannot use consume mode when you select from it (see SELECT AND CONSUME).

QITS Column

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.

A QITS column cannot be defined as any of the following:
  • UNIQUE
  • PRIMARY KEY
  • Unique secondary index
  • Identity column

A QITS column can be the NUPI for a table, but 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.

Select the primary index column set that best optimizes the performance of browse mode select operations on the 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.