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

Describes any index, join, or residual conditions applied for specific AMP steps in a query.

Predicate Table Definition

The following CREATE TABLE request defines the Predicate table:

   CREATE TABLE Predicate (
     PredicateID          INTEGER NOT NULL,
     StepID               INTEGER NOT NULL,
     PredicateKind        CHARACTER(1) NOT NULL,
     PredicateText        VARCHAR(2000) CHARACTER SET UNICODE
                          NOT CASESPECIFIC NOT NULL
     Overflow CHAR(1)     CHARACTER SET LATIN NOT CASESPECIFIC
     Complete CHAR(1)     CHARACTER SET LATIN NOT CASESPECIFIC)
   UNIQUE PRIMARY INDEX PK_PredID (PredicateID);

Attribute Definitions for Predicate

The following table defines the Predicate table attributes:

Attribute Description
PredicateID
  • Unique identifier for the predicate.
  • UPI for the table.
StepID Unique identifier for the AMP step.
PredicateKind Describes the predicate condition associated with this step:
  • If A, the predicate is an additional join condition.
  • If G, the predicate is a range constraint.

    Used for value-ordered relations.

  • If I, the predicate is a condition associated with an index.
  • If J, the predicate is a join condition.
  • If L, the predicate is a condition on the left relation in a join.
  • If Q, a row partition elimination occurs for a source condition.

    This is a residual condition on the left or right table in a join or on a single-table retrieval. Row partition elimination occurs before accessing the rows, so the condition applies only to rows retrieved from row partitions that were not eliminated.

  • If R, the predicate is a condition on the right relation in a join.
  • If S, the predicate is a source condition.

    This is a residual condition on the left or right table in a join or on a single-table retrieval. No row partition elimination occurs before accessing the rows.

PredicateText Full text of the predicate as shown in the EXPLAIN report.
Overflow Contains a value of T if the predicate text is greater than 2000 characters. Otherwise, contains a value of F.
Complete Contains a value of T if the complete predicate text is saved in the predicate table or qryrelx table. If a LIMIT clause exists and the specified limit size is less than the actual predicate size, then this field contains a value of F.