15.10 - CleanupStatsReport - Teradata Database

Teradata Database Application Programming Reference

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1090-151K

Displays a summary of events recorded from a prior call to the CleanupStats external stored procedure.

REPLACE PROCEDURE CleanupStatsReport(IN AnalysisId BIGINT)
           .
           .
           .
;
 

Parameter

Description

AnalysisId

Results ID from a prior call to the CleanupStats external stored procedure. For more information, see “CleanupStats” on page 523.

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 SQL External Routine Programming.

 

Parameter

Description

EventType

Event type:

  • C means the event is identified for cleaning.
  • R means the event is identified for reactivation.
  • 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.

    Note: This value is NULL for non-index objects.

    FieldNames

    Column or expression name on which the event was recorded.

    Note: Multiple names are separated by a comma.

    MarkedInActive

    If EventType is C, the possible values are:

  • Y means the identified statistic is marked ineligible for future PrepCollect calls.
  • N means the identified statistic is marked eligible for future PrepCollect calls.
  • If EventType is R, the possible values are:

  • Y means the identified statistic is marked eligible for future PrepCollect calls.
  • N means the identified statistic is marked ineligible for future PrepCollect calls.
  • For more information, see “PrepCollect” on page 546.

    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” on page 523.

    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