By default, the ResyncStats external stored procedure operates on all statistic definitions defined in the TDSTATS database.
Teradata recommends running ResyncStats when the following occurs:
- Statistics definitions are automated and dropped as a result of a SQL DROP STATISTICS statement.
- The RunCollectReport external stored procedure reports errors from collections issued on statistics that no longer exist in the dictionary
Synchronizing the TDSTATS Database
To synchronize the TDSTATS database, you can call one of the following external stored procedures:
- ResyncStats with DatabaseName and TableName specified as NULL.
- AutomateStats with DeleteOrphans specified as Y.
To copy additional statistics definitions from DBC to the TDSTATS database, use the AutomateStats external stored procedure. For details, see AutomateStats.