top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is JDBC Batch Processing and what are it’s benefits?

0 votes
482 views
What is JDBC Batch Processing and what are it’s benefits?
posted Aug 22, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Sometimes we need to run bulk queries of similar kind for a database, for example loading data from CSV files to relational database tables. As we know that we have option to use Statement or PreparedStatement to execute queries. Apart from that JDBC API provides Batch Processing feature through which we can execute bulk of queries in one go for a database.

JDBC API supports batch processing through Statement and PreparedStatement addBatch() and executeBatch() methods.

Batch Processing is faster than executing one statement at a time because the number of database calls are less.

answer Aug 23, 2017 by Ayush Srivastav
...