Field Mode Spool Space Sizing Equation - 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

Use the following equation to determine the amount of usable data space for Field mode:

Usable Data Space = a(RO + RP + n(PH + NF + CF)) + b(SNF + SCF)

The following parameter definitions are used with this equation:

Parameter Definition
a Number of rows being selected.
RO Row overhead (22 bytes per row).
RP Row parcel indicators; 8 bytes per row (rec start, rec end).
n Number of columns being selected.
PH Parcel headers (4 bytes per field).
NF Formatted size of each numeric column (spaces, dollar signs, and commas must be included).
CF Formatted size of each character column.

For example, a selected column defined as VARCHAR(200) takes up 200 characters even with only 3 nonblank characters.

The value for CF can be less than the CREATE TABLE definition of the string only if there is a FORMAT phrase.

b Number of numeric columns in the ORDER BY clause (sort key).
SNF Sorted numeric fields (8 bytes each).
SCF Formatted size of each character column in the ORDER BY clause.

If an order operation is done on a column defined as VARCHAR(200), 200 characters are allowed, even if there are only 3 nonblank characters.

The value for CF can be less than the CREATE TABLE definition of the string only if there is a FORMAT phrase. The formatted length of the character string must be rounded up to the next even value, then 2 more bytes must be added to the number.