Returns a summary of events performed by a prior invocation of an Automate or Deautomate-related operation.
REPLACE PROCEDURE TDSTATS.AutomateReport (IN AutomateId BIGINT) . . . ;
Report data is taken from the TDSTATS.AutomateHistoryTbl table along with corresponding data from the TDSTATS.StatsTbl and dictionary tables.
AutomateReport returns the following information for those statistics, such as Geospatial statistics, that are excluded from automation:
- A value of N in the Successful output column.
- A warning message in the EventDescription output column.
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 .
|DatabaseName||Database from which statistics were automated.|
|ObjectName||Table from which statistics were automated.|
|IndexNumber||Dictionary ID of the index whose statistics were automated.
This value is NULL for non-indexes.
|IndexName||User assigned name for the index, if any.|
|ExpressionList||List of comma separated fields on which statistic definitions are defined.|
|EventDescription||Text description of the event. For example, if the statistic cannot be automated, the EventDescription parameter returns a warning message.|
|EventDate||Time at which the Automation event occurred.|
|Approved||Flag indicates if the caller approved the copied statistics.|
|StatsType||Type of statistics identified by the dictionary:
V and Q statistic types are reserved for future use.
|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 automated statistic as recorded in the TDSTATS.StatsTbl.SCOID column.|
|AutomateId||Automated Statistics Management assigned ID for the history results from this operation.|
Example: Using AutomateReport
The following example shows a summary of the actions performed by a prior call to the AutomateStats external stored procedure.
CALL TDSTATS.AutomateReport(1); *** Procedure has been executed. *** Warning: 3212 The stored procedure returned one or more result sets. *** Total elapsed time was 1 second. *** ResultSet# 1 : 5 rows returned by "TDSTATS.AUTOMATEREPORT". DatabaseName ObjectName IndexNumber ExpressionList EventDescription ..... ---------------- ----------- ----------- ------------- ---------------- ..... PERSONNEL EMPLOYEE 1 EmpNo AUTOMATED STAT PERSONNEL EMPLOYEE 4 Name AUTOMATED STAT PERSONNEL DEPARTMENT 1 DeptNo AUTOMATED STAT PERSONNEL DEPARTMENT ? DeptName AUTOMATED STAT PERSONNEL PROJECT 1 Proj_Id AUTOMATED STAT