Displays a summary of events recorded from a prior call to the CleanupStats external stored procedure.
REPLACE PROCEDURE TDSTATS.CleanupStatsReport ( IN AnalysisId BIGINT ) ... ;
- Result ID from a prior call to the CleanupStats external stored procedure. For more information, see CleanupStats.
|EventDescription||Text description of the event or action.|
|EventTimeStamp||Time at which the event occurred.|
|DatabaseName||Database on which the cleanup event was recorded.|
|ObjectName||Table on which the cleanup event was recorded.|
|IndexNumber||Index number on which the cleanup event was recorded.
This value is NULL for non-index objects.
|FieldNames||Column or expression name on which the event was recorded.
Multiple names are separated by a comma.
|MarkedInActive||If EventType is C, the possible values are:
If EventType is R, the possible values are:
For more information, see PrepCollect.
|LastAccessedByOpt||Last recorded usage by the query optimizer.|
|StatsId||Dictionary assigned ID for the statistic as recorded in the DBC.StatsTbl.StatsId column.|
|StatsName||User assigned name for the statistic, if any.|
|SCOID||Automated Statistics Management assigned ID for the statistic as recorded in the TDSTATS.StatsTbl.SCOID column.|
|AnalysisId||Automated Statistics Management assigned ID for the history results from this CleanupStats operation.
For more information about this external stored procedure, see CleanupStats.
Returning Result Set
The output of this external stored procedure is in the form of a stored procedure dynamic result. That is, the external stored procedure can return result sets to the client application or to the caller of the external stored procedure (in addition to consuming the result sets itself) upon completion of the external stored procedure.
For more information about stored procedure dynamic result sets, see Teradata Vantage™ - SQL External Routine Programming, B035-1147.
Example: Using CleanupStatsReport
The following example shows the summary of events for the Personnel database from a prior invocation of CleanupStats.
CALL TDSTATS.CleanupStatsReport(2); *** Procedure has been executed. *** Warning: 3212 The stored procedure returned one or more result sets. *** Total elapsed time was 1 second. *** ResultSet# 1 : 3 rows returned by "TDSTATS.CLEANUPSTATSUSAGEREPORT". EventType EventDescription DataBaseName TableName IndexNumber FieldNames --------- ----------------------------- ------------ --------- ----------- ---------- C STATS IDENTIFIED FOR CLEANING PERSONNEL CHARGES 1 EMPNO, PROJ_ID C STATS IDENTIFIED FOR CLEANING PERSONNEL CHARGES 4 PROJ_ID R STATS IDENTIFIED FOR ACTIVATION PERSONNEL EMPOYEE ? NAME