16.10 - QryRelX - Teradata Database

Teradata Database SQL Request and Transaction Processing

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Programming Reference
User Guide
featnum
B035-1142-161K

Function of QryRelX

Stores overflow text for the QueryText attribute of the Query table or the TableDDL attribute of the Relation table.

There is at least one row in QryRelX for each row in Query or Relation with an Overflow flag set to T.

QryRelX Table Definition

The following CREATE TABLE request defines the QryRelX table:

   CREATE TABLE QryRelX(
     RowType   CHARACTER(1),
     KeyValue  INTEGER NOT NULL,
     SeqNumber SMALLINT NOT NULL,
     Text      VARCHAR(30000) CHARACTER SET UNICODE
               NOT CASESPECIFIC NOT NULL)
   PRIMARY INDEX(RowType, KeyValue);

Attribute Definitions for QryRelX

The following table defines the QryRelX table attributes:

Attribute Definition
RowType Defines whether the row handles text overflow from the Query table or from the Relation table.
  • If Q, the text is overflow from the Query table.
  • If R, the text is overflow from the Relations table.
KeyValue Defines the implicit primary key for QryRelX rows.
  • If RowType is Q, then KeyValue is the QueryID.
  • If RowType is R, then KeyValue is the RelationKey.
SeqNumber Specifies whether the current row is the last row in the Overflow.

If the overflow QueryText or TableDDL text does not fit into a single row, it is divided into multiple rows, each with a unique SeqNumber value.

The value of SeqNumber begins at 1 and is incremented by 1 for each new text row required.

Text The overflow QueryText or TableDDL text.

The upper bound for this text is 30,000 characters per row up to a total of 1 megabyte of overflow SQL query text.