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

Generates sequential alternate keys to be used by other QCD tables.

Each column in the table (except QCDVersion, DemographicsID, and StatisticsID) is initialized to 1 and then incremented after each use.

SeqNumber Table Definition

The following CREATE TABLE request defines the SeqNumber table:

   CREATE TABLE SeqNumber (
     PIndex           INTEGER NOT NULL,
     WorkLoadID       INTEGER NOT NULL,
     MachConfigID     INTEGER NOT NULL,
     QueryID          INTEGER NOT NULL,
     UDB_KEY          INTEGER NOT NULL,
     StepID           INTEGER NOT NULL,
     RelationKey      INTEGER NOT NULL,
     PredicateID      INTEGER NOT NULL,
     RecommendationID INTEGER NOT NULL,
     QCDVersion       VARCHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC,
     DemographicsID   INTEGER NOT NULL,
     StatisticsID     INTEGER NOT NULL)
   PRIMARY INDEX (PIndex)
   UNIQUE INDEX (RelationKey);

Table Initialization Statement

SeqNumber is initialized by the following INSERT request.

   INSERT INTO SeqNumber VALUES(1,1,1,1,1,1,1,1,1,’QCF03.00.00’,2,2);

Attribute Definitions for SeqNumber

The following table defines the SeqNumber table attributes:

Attribute Definition
PIndex An artificial column used as the NUPI for this table.
WorkLoadID Unique identifier for the workload.
MachConfigID Unique identifier for the configuration of a hardware configuration stored in QCD.
QueryID Unique identifier for the query.
UDB_KEY Unique identifier on MachConfigID for the user or database that performed the query.
StepID Unique identifier for an AMP step in the query.
RelationKey Unique identifier for a table, derived table, or spool file used in the query.
PredicateID Unique identifier for the predicate used in the query.
RecommendationID Unique identifier for a set of index recommendations.
QCDVersion Describes the version of QCD running.
DemographicsID Identifies whether the demographics were captured on the current system or imported from another system.

Initially set to 2.

StatisticsID Identifies whether the statistics were captured by a COLLECT STATISTICS (QCD Form) or INSERT EXPLAIN request.

Initially set to 2.