AddExcludedObject Stored Procedure | Application Programming Reference | Teradata Vantage - AddExcludedObject - Teradata Vantage - Analytics Database

Application Programming Reference

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
qld1628112131956.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ajo1472244909562
lifecycle
latest
Product Category
Teradata Vantageā„¢

Specifies one or more objects whose statistics are to be permanently excluded from the Automate, Analyzer, and Collect-related operations.

Syntax

REPLACE PROCEDURE TDSTATS.AddExcludedObject (
  IN DatabaseName VARCHAR(128) CHARACTER SET UNICODE,
  IN TableName    VARCHAR(128) CHARACTER SET UNICODE,
  OUT NumAdded    INTEGER
)
  ...
;

Syntax Elements

DatabaseName
Name of the database. DatabaseName identifies the excluded database or the database containing the excluded table.
TableName
Name of the table within the specified DatabaseName. TableName identifies the table to exclude within DatabaseName.
NumAdded
Number of objects excluded.

Usage Notes

When you exclude objects by AddExcludedObject, it supersedes any argument values specified in calls to Automate, Analyze, and Collect-related APIs and allows Automate, Analyze, and Collect-related APIs to be called in an "everything but" manner.

Exclusion is not applicable to the TruncateAnalyzerHistory, TruncateAutomateHistory, and TruncateCollectHistory external stored procedures. Rows corresponding to any excluded objects are still deleted as part of the truncation operation assuming they qualify based on the scope of the specified input parameters. For more information about these external stored procedures, see DBAControl Open APIs for Managing Space.

Excluding Statistics

To exclude all ... You must specify a value for ...
statistics for a particular table DatabaseName and TableName.
objects and their statistics within a particular database DatabaseName only.

Examples: Using AddExcludedObject

The following example shows how to exclude the table named Project and automate all statistics from the Personnel database, except those on the Project table.

CALL TDSTATS.AddExcludedObject('Personnel','Project', NumAdded);

Result:

*** Procedure has been executed.
 *** Total elapsed time was 1 second.
 NumAdded
---------
        1
CALL TDSTATS.AutomateStats ('Personnel', NULL, NULL, NULL,'Y','N', AutomateId, NumCopied, NumRemoved);

Result:

*** Procedure has been executed.
 *** Total elapsed time was 1 second.
 AutomateId    NumCopied   NumRemoved
-----------  -----------  -----------
          1            4            0