17.00 - Example: Using Constant Expression to Specify PERM, SPOOL, and TEMPORARY Space for User - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Release Date
September 2020
Content Type
Programming Reference
Publication ID
B035-1144-170K
Language
English (United States)

The following request creates PERM space for a user with a size based on the constant expression 2,000,000 (HASHAMP()+1), SPOOL with a size based on the same constant expression 2,000,000 (HASHAMP()+1), and TEMPORARY with a size based on the constant expression 2,000,000 (HASHAMP()+1). The expressions calculate the number of AMPs in the current system and scales the PERM, SPOOL, and TEMPORARY space for the sls120639 user to that size.

     CREATE USER sls120639 AS
       DEFAULT DATABASE = it_dev,
       PASSWORD = (EXPIRE = 0),
       PERM = 2000000*(HASHAMP()+1),
       SPOOL = 2000000*(HASHAMP()+1),
       TEMPORARY = 2000000*(HASHAMP()+1);