AnalyzeSP | SQL Operators & User-Defined Functions | Teradata Vantage - AnalyzeSP - Advanced SQL Engine - Teradata Database

SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2023-04-27
dita:mapPath
qqu1556127655717.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1210
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

The AnalyzeSP procedure analyzes tables and table usage, then makes recommendations on whether to move tables to a new destination map.

The analysis is limited to a previously defined object list representing any number of databases and tables.

Syntax

CALL [TDMaps.] AnalyzeSP (
  'DestinationMapListName',
  'ObjectListName',
  'ExclusionListName',
  [ { 'LogStartTime' | NULL } , ]
  [ { 'LogEndTime' | NULL } , ]
  { 'LogDatabase' | NULL },
  'OutputActionList',
  :NumAlters,
  :NumExcludes,
  :NumLogEntries
) [;]
TDMaps.
The name of the database.
'DesintationMapListName'
The name of an existing map list for recommending table actions on.
'ObjectListName'
Name of the object list. It must be specified.
'ExclusionListName'
Specifies the objects to skip analysis in the exclusion list.
'LogStartTime'
Limits query log to queries logged after a specified time.
'LogEndTime'
Limits query log to queries logged before a specified time.
'LogDatabase'
The database containing the query log tables.
'OutputActionList'
The name to assign to a list of table actions recommended by a procedure call.

Output Parameters

The output parameters, which include:
  • :NumAlters: The number of rows written to TDMaps.ActionsTbl where Action = ALTER.
  • :NumExcludes: The number of rows written to TDMaps.ActionsTbl where Action = EXCLUDE.
  • :NumLogEntries: The number of analyzed logged queries that reference one or more tables in the :ObjectListName.