INITIATE PARTITION ANALYSIS Examples | SQL Statements | Teradata Vantage - 17.05 - INITIATE PARTITION ANALYSIS Examples - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

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

Example: Partition Analysis on All Tables

The following example considers partitioning expression recommendations for all tables in a workload; therefore, no ON clause specified:

     INITIATE PARTITION ANALYSIS
     FOR myworkload
     IN myqcd
     AS myppirecs;

Now you can examine the recommended partitioning expressions from this partition analysis using the following SELECT request:

     SELECT tablename, expressiontext
     FROM qcd.partitionrecommendations
     WHERE resultnametag = 'myppirecs';

Example: Partition Analysis on Specified Tables

The following example considers partitioning expression recommendations for specific tables within a workload; therefore, an ON clause is specified:

     INITIATE PARTITION ANALYSIS
     ON tab1, tab2
     FOR myworkload 
     IN myqcd
     AS myppitabrecs;

Example: Partition Analysis with a Time Limit

The following example places a 5 minute time limit on the partitioning expression analysis:

     INITIATE PARTITION ANALYSIS
     FOR myworkload
     IN myqcd
     AS myfastanalysis
     TIME LIMIT = 5;