Skip to Content

Configure batching

Batch processing, or batching, is the processing of transactions in a group or batch. In Vinyl, batching is an optional feature that can be used when processing very large sets of data through CRUD Rules in the Business Layer. One of the benefits to using batching is that it can prevent deadlocks by freeing the connection to the Table / Database on both the source and target sides.

By default, batching is not enabled in Vinyl and must be manually configured.

General guidelines for batching

  • Source Batch Size value must be less than 32000
  • If the data is changing from under you, (i.e., hundreds of people are adding/removing records while your batch is running) the CRUD Action should use CRAM rather than Insert

To enable batching on a CRUD rule

  1. Navigate to the CRUD Rule in the Business Layer
  2. Click on More > Edge Case
  3. Enter a numeric value into Source Batch Size. This value represents the number of records to be included in a single batch. For example: 1000
  4. Select the appropriate Batch mode setting:

    • Cycle through rows should be selected when the result set will not change after the CRUD Rule executes.
      • For example: You want to update a column A of every row that has a Column B = 3, that source will not change throughout (running the results before and after will yield the same results), so you can cycle through the rows.
    • Consume rows should be selected when the result set changes after the CRUD Rule executes.
      • For example: You want to update all rows with Column B = 3 to have a value of 2 on that same row, that means after the first batch runs the result set will change, so you have to consume rows instead.


If you select Consume rows as the Batch mode setting, Vinyl also displays a Batch Limit field you can set. Batch Limit here represents the most number of batches that would be read before it stops. This setting essentially prevents an infinite loop. For example: If you expected your rule to modify 100,000 rows of data, and you have Source Batch Size set to 5000, you might set Batch Limit to 30 so that the max number of rows it would consume would be 150,000.