QryRelX - 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

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.

Overflow QueryText or TableDDL text that does not fit into a single row 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.