DIAGNOSTIC HELP SAMPLES
Purpose
For each scope level, returns the random AMP statistical samples that have been set.
Syntax
where:
Syntax element … |
Specifies … |
target_system_name |
the name of the target system for which information is to be reported. For information on object naming, see SQL Fundamentals. target_system_name is not case sensitive and and can be up to 63 characters in length. If you do not include a target system name, information is reported for all the samples set in SESSION and SYSTEM modes. Names that contain pad characters or nonstandard characters must be enclosed in APOSTROPHE characters. |
ANSI Compliance
DIAGNOSTIC HELP SAMPLES is a Teradata extension to the ANSI SQL:2011 standard.
Required Privileges
None.
DIAGNOSTIC HELP SAMPLES and Target Level Emulation
DIAGNOSTIC HELP SAMPLES does not require Target Level Emulation to be enabled, but it cannot report scope level statistics unless TLE is enabled. An error message indicates that TLE is not enabled.
Session Mode Restrictions
You cannot perform DIAGNOSTIC HELP SAMPLES in ANSI session mode or within explicit transaction boundaries in Teradata session mode.
Example
This request displays all the samples set in all scope levels.
DIAGNOSTIC HELP SAMPLES;
Example
This request displays all the samples set in all scope levels for the test_1 system. The scope level for test_1 is set to SESSION.
DIAGNOSTIC HELP SAMPLES Test_1;
*** Help information returned. One row.
*** Total elapsed time was 1 second.
SystemName TEST_1 DatabaseName EMPLOYEE
TableName PAYROLL Level SESSION
For More Information
For more information about random AMP samples, see: