QryRelX - Advanced SQL Engine - Teradata Database

SQL Request and Transaction Processing

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
ykx1561500561173.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1142
lifecycle
previous
Product Category
Teradata Vantageā„¢

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.