Batch Thread Strategy by Actual Keys

Typically, system generated keys are assigned in such a way that they are evenly distributed across batch threads. This is known as the "Thread Iteration (THDS)" strategy where each thread is assigned a low to high key range that is based solely on the size of the primary key field. There are situations where keys do not evenly distribute across threads, resulting in uneven thread completion times. For example, conversion entities in the staging schema have legacy keys, which are typically not evenly assigned. This impacts the Object Validation and XML resolution batch processes that thread by legacy keys. 

In this release, a new variation of the thread distribution strategy 'KEYS" was introduced where the low and high IDs for the thread are calculated based on actual keys. The range is calculated based on the total number of records in the table divided by the requested number of threads, such that each thread processes approximately the same number of records. 

The new strategy is available to plug-in driven and standard monitor batch processes. These batch programs support a new Batch Strategy batch parameter that can be used to override the default strategy. Note that the new strategy can only be used when processing is over a table with a single system generated prime key.

A better record distribution across batch threads improves the overall completion time of the batch process.

Steps to Enable

To enable this feature when submitting a monitor batch or a plug-in driven batch, populate the Batch Strategy parameter with the value KEYS.