Example: Using a Constant Expression to Specify the PERM, SPOOL, and TEMPORARY Space for a Database - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

The following statement creates PERM space for database production_development with a size based on the constant expression 2,000,000 * (HASHAMP()+1), SPOOL with a size based on the 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 scale the PERM, SPOOL, and TEMPORARY space for the production_development database to that size.

CREATE DATABASE production_development AS
  PERM = 2000000*(HASHAMP()+1),
  SPOOL = 2000000*(HASHAMP()+1),
  TEMPORARY = 2000000*(HASHAMP()+1);