This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
Batch size
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
jOOQ offers a transparent batching API, which can buffer all statements generated by jOOQ and other JDBC backed APIs transparently in order to batch them:
// Everything in the below lambda will be buffered and batched
DSL.using(configuration).batched(c -> {
    module1.insertSomething(c);
    module2.insertSomethingElse(c);
});
												Use the Settings.batchSize flag to govern the maximum batch statement size of this API:
											
Settings settings = new Settings()
    .withBatchSize(100); // Default Integer.MAX_VALUE
                                                Starting from jOOQ 3.19, this Settings.batchSize flag also applies to most other batch API.
                                            

 
        
Feedback
Do you have any feedback about this page? We'd love to hear it!