Aligned Row Format Join Index Row Layout for a Compressed Join Index with an Nonpartitioned Primary Index - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Consider the following example CREATE JOIN INDEX text:

CREATE JOIN INDEX test AS
  SELECT (a,b), (x,y)
  FROM table1, table2;

Vantage packs columns a and b, labeled as the column_1_name list in the CREATE JOIN INDEX syntax diagram, in the last subfield of Field1 of a row compressed join index row the same way that index keys (an index key is the set of values stored as “the index” in a secondary index) are packed in the Field1 of a secondary index row (columns a and b are stored in the area labeled as Index Value in the row format graphic).

The system also stores the non-row compressed index values (each instance of those (x,y) values that has the same (a,b) values as a minirow in Field2) in the area labeled as Index Minirow List in the row format graphic. These columns are labeled as the column_2_name list in the CREATE JOIN INDEX syntax diagram.

The region labeled as Index Value in the following row format graphic is the column_1_name value set for the row and must be interpreted as containing the requisite pad bytes depicted in Aligned Row Format Structure: Uncompressed Join Index with Nonpartitioned Primary Index). The region is an abbreviation for the data type orderings and offsets shown in detail in the row format diagrams for non-row-compressed join index rows. The number of trailing pad bytes required by a given row is the number of bytes needed to make the row end on a modulo(8) boundary.


""

When you row compress a join index, the column_2_name value set for each row in the index is stored as a minirow. Each minirow consists of a BYTE length field, an optional presence bits array field, and a column_2_name value set (see Aligned Row Format Structure: Uncompressed Join Index with Nonpartitioned Primary Index or Packed64 Row Structure for Compressed Join Index with Nonpartitioned Primary Index).