Row Length Characteristics and Row Components - 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

The maximum length for a database row on both packed64 and aligned row format systems is 1 MB.

The following table describes the individual components of a base table row that does not have column partitioning for both packed64 systems and aligned row systems:

Component Number of Bytes Description
Reference array pointer 2 2-byte entry maintained at the bottom of each data block that points to the first byte of each row in the block. Not part of the physical row.
Row Header
Row length, small-row format 2 Specifies the exact length of the row in bytes.
Row length, large row format 4 Specifies the exact length of the row in bytes.
Nonpartitioned Primary Index RowID 8 Contains two physical fields and one virtual field:
  • Partition number:

    Implicitly assumed to have a value of 0 (as indicated by 2 bits in the flag byte).

    Consumes 0 bytes from the row.

  • Row hash value
  • Uniqueness value
Row hash 4 Contains the hashing algorithm-generated row hash value for the row.

The value is 4 bytes wide irrespective of the number of hash buckets the system has.

Uniqueness value 4 Contains the system-generated uniqueness value for the row.
Internal partition number 0 Logical field not stored as a physical value because its value is known to the system to be 0..
Partitioned RowID 10 or 16 Contains these physical fields:
  • Partition number:

    Contains a value between 1 and 65,535 or big number that defines the internal partition number for the row.

    Consumes 2 or 8 bytes from the row.

  • Row hash value.
  • Uniqueness value.

The partition number field is not contiguous with the row hash and uniqueness value fields, but immediately follows the first byte of the presence bits array.

Row hash 4 Contains the hashing algorithm-generated row hash value for the row.

The value is 4 bytes wide irrespective of the number of hash buckets the system has.

Uniqueness value 4 Contains the system-generated uniqueness value for the row.
Internal partition number 2 or 8 Contains the partition number for a row in a PPI table.
  • If the maximum partition is  65,535, partition number is 2 bytes.
  • If the maximum partition is > 65,535, partition number is 8 bytes.
  • If the row does not belong to a PPI table, then this field is logical only, and its value is 0.
Flag byte 1 Defines whether the 4-byte Partition number field is used.
  • If the flag is set, the row is from a PPI table and the row header uses the 4-byte partition number field that follows the first presence octet to store its partition number.
  • If the flag is not set, the row is not from a PPI table and the system assumes that the partition number for the rowID is 0.
Presence Bits Array
First byte of the presence bit array

See Presence Bits for more information.

1

If the table has a PPI, there is an additional 2 or 8 byte overhead in the presence bits array.

Defines column nullability and compressibility.
Additional bytes of presence bit arrays 8 bytes per presence bit array. Provides additional space to define nullability and compressibility for columns if the first presence bit array is too small to contain all the information for the table.

For more information, see Presence Bits.

VARCHAR Offset Array
Offset array pad bytes

The array pad bytes are only used for aligned row format systems.

Varies Aligns the offset array at a 2-byte boundary.

This component exists for rows on aligned row systems only.

Column offsets Varies
  • For small-row format: 2 bytes per variable length column.
  • For large-row format: 4 bytes per variable length column.
Only present when variable length columns are defined for a table.

Indicates the intrarow location of the referenced column.

Fixed Length Columns
Fixed length column pad bytes b Varies Aligns the fixed length columns on an 8-byte boundary.

This component exists for rows on aligned row systems only.

Fixed length columns Varies Contains all non-compressible fixed length columns.
Compress Length Columns
Compressible column pad bytes b Varies Aligns the value compressible columns on an 8-byte boundary.

This component exists for rows on aligned row systems only.

Compressible columns Varies Contains compressible columns with data belonging to one of four categories:
  • Not compressed using multivalue compression.
  • Not compressed using algorithmic compression.
  • Compressed using algorithmic compression.
  • Compressible data that is not null.
Variable-Length (VARCHAR and VARBYTE) Columns
Variable length column pad bytes b Varies Aligns the variable-length columns on an 8-byte boundary.

This component exists for rows on aligned row format systems only.

VARCHAR and VARBYTE columns Varies Only present when variable-length columns are defined for a table.

Contains all variable length character columns. The column offsets field points to the starting location for each variable length column in the row.

Row Trailer
Trailing pad bytes Varies Aligns the row on an even-byte boundary for packed64 format systems or on an 8-byte boundary for aligned row systems.