jdbcStatement batching


Statement batching is either executing multiple statements as one unit (with a normal java.sql.Statement), or a single statement with multiple sets of parameter values (with a java.sql.PreparedStatement).


Statement batching allows a program to collect related statement, or in the case of prepared statements related parameter value sets, and send them to the database server as a single execute.

The benefits of statement batching can include improved performance. If and how these performance benefits are achieved depends on the driver and database support, but they include:

  • Sending all statements (or all values sets) in one command
  • Rewriting the statement(s) so they can be executed like one big statement