DIAGNOSTIC HELP SAMPLES - 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

Purpose

For each scope level, returns the random AMP statistical samples that have been set.

For more information about random AMP samples, see:

Required Privileges

None.

Syntax



Syntax Elements

target_system_name
Name of the target system for which information is to be reported.
target_system_name is not case sensitive 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.

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: Display All the Samples Set

This request displays all the samples set in all scope levels.

     DIAGNOSTIC HELP SAMPLES;

Example: Display All the Samples Set for a System

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