About PurgeBGTaskHistorySp

The PurgeBGTaskHistorySp method is important to the PurgeEventData process in cleaning up records from the BGTaskHistory_mst table across all sites in daily batches. Up to 50,000 records is deleted in a day, and the batch size is set to 500 with up to 100 batches a day.

In the Event Trigger form, use the BGTDelOlderThanDays parameter to specify the number of days from the current date to determine which records should be deleted. You can also use the NameOfEvent parameter to specify the name of the event called by the trigger to purge the data.

Additionally, apart from purging the records from BGTaskHistory_mst, entries in related tables such as ProcessErrorLog and ProcessLineNumber are purged based on matching ProcessId and BGTaskHistory TaskNum values for both tables that was deleted.