17.05 - TEMPORARY - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)

A keyword allowing you to define how much space to allow for creating materialized global temporary tables.

n
n cannot exceed the temporary space parameter in the profile of the creator.
n can be an integer, a decimal value, or a floating point value.
n refers to bytes, whether or not the optional BYTES keyword is specified.
If no temporary space limit is defined for the profile, the system uses the temporary space limit defined for the individual user. If temporary space is not defined for either the profile or user, the system uses the temporary space limit for the owner of the space in which the user was created.
If both space allocations are defined, temporary space is reserved prior to spool space.
Disk usage for a materialized global temporary table is charged to the temporary space allocation of the user who referenced the table.
constant_expression
Any SQL expression that does not make any column references. Specifying an appropriate constant expression for the TEMPORARY space size of a user enables Vantage to assign an optimal quantity of TEMPORARY space that scales to the size of your system by allocating TEMPORARY space on a per AMP basis.
When you specify a TEMPORARY space size based on a constant expression, the assigned size does not automatically scale if, for example, you add more AMPs to your system.
BYTES
BYTES is an optional keyword that redundantly specifies the unit for the amount of TEMPORARY space
NULL
The default is NULL, which causes Vantage to use the setting defined for the user.