Purpose
Instructs the Optimizer on the test system to activate or deactivate a cost profile at the specified level. The system propagates activated cost profiles to successor levels.
For more information about cost profile attributes, see “DIAGNOSTIC HELP PROFILE”.
For more information about cost profiles, see SQL Request and Transaction Processing .
Required Privileges
You must have SELECT privileges on SystemFE.Opt_Cost_Table, be user DBC, or be user SystemFE to set profiles.
The ability to perform DIAGNOSTIC SET PROFILE is controlled by the setting of the EnableSetCostProfile DBS Control field.
Syntax
Syntax Elements
- profile_name
- Name of a cost profile to be activated.
- NOT
- Deactivate the cost profile at the specified scope level.
- scope_level
- Scope level for which the profile is to be set.
- IFP restricts the cost profile setting to the current parsing engine.
- REQUEST restricts the cost profile setting to the current SQL request.
- SESSION restricts the cost profile setting to the current session.
- SYSTEM restricts the cost profile setting to the current system, which means that no restriction is enforced on the data to be reported.
If you specify a scope level of SYSTEM, then the specified cost profile becomes the standard default cost profile and the system saves its identifier in the CostProfileId DBS Control field. See Utilities .
ANSI Compliance
DIAGNOSTIC SET PROFILE is a Teradata extension to the ANSI SQL:2011 standard.