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:
|
|||||
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:
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.
|
|||||
Flag byte | 1 | Defines whether the 4-byte Partition number field is used.
|
|||||
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
|
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:
|
|||||
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. |