15.10 - Predicate - Teradata Database

Teradata Database SQL Request and Transaction Processing

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
User Guide
featnum
B035-1142-151K

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

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);

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 kind of 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 prior to 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 prior to accessing the rows.

    PredicateText

    Full text of the predicate as it appears 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.