AddQueryList - Teradata Database - Teradata Vantage NewSQL Engine

Application Programming Reference

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
vwf1492987142269.ditamap
dita:ditavalPath
changebar_rev_16_20_exclude_audience_ie.ditaval
dita:id
B035-1090
lifecycle
previous
Product Category
Teradata Vantage™

Creates a new query list with a user specified name which can be passed to AnalyzeStatsUsage for analysis.

Definition

REPLACE PROCEDURE TDSTATS.AddQueryList(
  IN QueryListName VARCHAR(128) CHARACTER SET UNICODE)
           .
           .
           .
;

Input Parameter

Parameter Description
QueryListName Name of the query list.
QueryListName must be unique among all query lists stored in the TDSTATS database.

Usage Notes

After a new query list is created, you can call the AddQueryListEntry external stored procedure to add queries to a list.

Example: Using AddQueryList

The following example shows how to create a list consisting of two queries and analyze statistics usage on them.

The input argument value that begins with a colon represents a host variable whose value was populated in a prior call where it served as an output argument.

CALL TDSTATS.AddQueryList('MySlowQueries');
CALL TDSTATS.AddQueryListEntry('MySlowQueries',8675309,1);
CALL TDSTATS.AddQueryListEntry('MySlowQueries',8675325,1);
CALL TDSTATS.AnalyzeStatsUsage(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MySlowQueries',
'N',AnalysisId, NumEvents);
CALL TDSTATS.AnalyzeStatsUsageReport(:AnalysisId);

Related Topics

For more information on ... See ..
the AnalyzeStatsUsage external stored procedure AnalyzeStatsUsage.
adding queries to your list AddQueryListEntry.