Examples - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
psg1480972718197.ditamap
dita:ditavalPath
changebar_rev_16_10_exclude_audience_ie.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Example: Set Cost Profile For System

This request sets the active SYSTEM-level cost profile using constant values from the profile named T2_special:

     DIAGNOSTIC SET PROFILE  T2_special  ON FOR SYSTEM;

Example: Set Cost Profile For Session or Request

This request sets the active SESSION-level or REQUEST-level cost profiles using constant values from the profile named T2_workaround1265:

     DIAGNOSTIC SET PROFILE T2_workaround1265 ON FOR SESSION;

     DIAGNOSTIC SET PROFILE T2_workaround1265 ON FOR REQUEST;

Example: Set Cost Profile For IFP-Level

This request sets the active IFP-level cost profile (an IFP-level scope applies to the current parsing engine only) using constant values from the profile named T2_workaround23:

     DIAGNOSTIC SET PROFILE  T2_workaround23  ON FOR IFP;
After the system processes this request, Teradata Database uses this IFP-level profile:
  • For new sessions.
  • As the prior cost profile for a subsequent DIAGNOSTIC SET PROFILE NOT ON FOR SESSION request.

    Example: Deactivate Cost Profiles

This request deactivates all cost profiles at the specified scope level:

     DIAGNOSTIC SET PROFILE OFF FOR SESSION;