Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14

Batch size

Applies to ✅ 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

References to this page

Feedback

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

The jOOQ Logo