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 particular 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 a particular 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 particular set of index recommendations. |
QCDVersion | Describes the version of QCD currently 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. |