DIAGNOSTIC HELP SAMPLES - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

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:

  • “DIAGNOSTIC DUMP SAMPLES” on page 634
  • “DIAGNOSTIC SET SAMPLES” on page 638
  • SQL Request and Transaction Processing