15.00 - Row Structure for Aligned Row Format Systems - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Row Structure for Aligned Row Format Systems

The row structure diagrams for aligned row format systems differs from those of packed64 systems by having five additional pad byte fields to ensure row alignment on an 8‑byte boundary. The following table lists each of these pad fields and explains their purpose:

 

                          Pad Byte Field Name

                                  Purpose

VARCHAR Offsets Array Alignment Pad Bytes

Aligns VARCHAR offsets array at a 2‑byte boundary.

Fixed Length Column Alignment Pad Bytes

Aligns fixed length columns.

Compressible Length Column Alignment Pad Bytes

Aligns value compressible length columns.

VARCHAR Column Alignment Pad Bytes

Aligns variable length columns.

Trailing Pad Bytes

Aligns entire row on an 8‑byte boundary.

Note that the Row Hash value is 4 bytes wide irrespective of the number of hash buckets the system has (see “Teradata Database Hashing Algorithm” on page 225).

Aligned Row Structure for an Nonpartitioned Table

The following graphic illustrates the basic structure of a Teradata Database row from a table on an aligned row format system with an nonpartitioned, or traditional, primary index.

Aligned Row Structure for a Partitioned Table With 65,535 or Fewer Combined Partitions

The following graphic illustrates the basic structure of a Teradata Database row from a table on an aligned row format system with a partitioned primary index that has 65,535 or fewer combined partitions:

The difference between this and the format of an nonpartitioned table row is the presence of a 2-byte or 8‑byte partition number field, which is also a component of the RowID (PPI table rows are an additional 4 bytes wider if they also specify multi-value compression. See “PARTITION Columns” on page 801). It is this field that generates the need for a BYTE(10) data type specification for a RowID. For nonpartitioned primary index tables, the partition number is assumed to be 0, so the rowID of an nonpartitioned primary index table is also logically BYTE(10) (see “ROWID Columns” on page 800).