Understanding EclipseLink, 2.6
  Go To Table Of Contents
 Search
 PDF

About Heterogeneous Batch Writing

The current release provides persistence unit properties to optimize transactions with multiple writes. The eclipselink.jdbc.batch-writing property configures the use of batch writing to optimize transactions with multiple writes. Batch writing allows multiple heterogeneous dynamic SQL statements to be sent to the database as a single execution, or multiple homogeneous parameterized SQL statements to be executed as a single batch execution.Note that not all JDBC drivers, or databases support batch writing.

The eclipselink.jdbc.batch-writing.size property configures the batch size used for batch writing. For parameterized batch writing this is the number of statements to batch, default 100. For dynamic batch writing, this is the size of the batched SQL buffer, default 32k.

The eclipselink.jdbc.batch-writing persistence property can also be used with query hints to configure if a modify query can be batched through batch writing. Some types of queries cannot be batched, such as DDL on some databases. Disabling batch writing will also allow the row count to be returned.