15.00 - Sizing Structured UDT Columns - Teradata Database

Teradata Database Design

Teradata Database
User Guide

Sizing Structured UDT Columns

For a distinct UDT, there is always a 1:1 correspondence between the type and its underlying predefined data type. As a result, to determine the size of a distinct UDT column, just use the size of the underlying predefined data type. Because of alignment differences for packed64 and aligned row systems, be sure to consult the size differences for the various data types on the two system types before making your row size estimates (see “Data Type Size Differences For Packed64 and Aligned Row Format Architectures” on page 823).

Unlike predefined data types, the size of each structured UDT you create is different, and you must calculate that size to account for the amount of storage a column with that type requires.

Note: You cannot use either multi‑value compression or algorithmic compression for structured UDT column data.

This topic first describes how a structured UDT is stored in a row, then describes how to calculate the number of bytes required to store a given structured UDT in persistent form.

See “Geospatial Data Types” on page 845 for information about sizing the system‑provided geospatial UDTs.

The dynamic UDT data type is a structured UDT with a fixed data type name of VARIANT_TYPE, so you can calculate the sizes of VARIANT_TYPE instances in the same way you would any other structured UDT.