Statistics purge

This purge removes statistics data from the system. It purges all records older than the specified retention days.

You can use purge codes pseudo-logic to analyze purges. If the following condition is met, the statistics detail is picked up for purge:

  • The last modification performed on the statistics detail should fall before the lead time (in days) setup.

This purge only reads the rules defined by the hub. Enterprise overridden rules are not considered. This purge should be single threaded when you run it in batch delete mode (BatchDelete=Y).

It is important to run this agent often. In a production environment, the YFS_STATISTICS_DETAIL table can grow large, very quickly. It does not carry any old data, therefore it is a good practice to purge it aggressively, from once a day to once a week, depending on the table size.

Attributes

The following are the attributes for this time-triggered transaction:

Table 1. Statistics purge attributes
Attribute Value
Base Transaction ID STATTBLPRG
Base Document Type General
Base Process Type General
Abstract Transaction No
APIs Called None
User Exits Called YFSBeforePurgeUE

Criteria parameters

The following are the criteria parameters for this transaction:

Table 2. Statistics purge criteria parameters
Parameter Description
Action Required. Triggers the transaction. If left blank, it defaults to Get, the only valid value.
Number of Records To Buffer Optional. Number of records to retrieve and process at one time. If left blank or specified as 0 (zero), it defaults to 5000.
Live Optional. Mode in which to run. Valid values are:
  • Y - Default value. Moves qualifying records from the regular tables listed under Tables Purged to the corresponding history tables.
  • N - Test mode. Determines the rows that are moved to history tables without actually moving them.
BatchDelete Required. The mode in which all records get deleted from the table. Valid values are:
  • Y - Default value. Records are deleted in batches.
  • N - Records are deleted one by one.
PurgeCode Required. Cannot be modified. Used for internal calculations, such as determining retention days. Corresponds with the PurgeCode used in Business Rules Purge Criteria.
CollectPendingJobs If this parameter is set to "N", the agent does not collect information on the pending jobs for this monitor. This pending job information is used for monitoring the monitor in the System Management.
ColonyID Required in a sharded deployment where the YFS_STATISTICS_DETAIL table may exist in multiple schemas. Runs the agent for the colony.

Statistics tracked

The following statistics are tracked for this transaction:

Table 3. Statistics purge statistics
Statistic Name Description
NumStatisticsPurged Number of statistics purged

Pending job count

For this transaction, the pending job count is the number of records that can be purged from the YFS_STATISTICS_DETAIL table.

Events raised

None.

Tables purged

YFS_STATISTICS_DETAIL