title: How to improve performance with executeBatch?
body: <p>I am writing Java code for inserting 45000 records into the table
  and I'm using the following code:</p>
  
  <pre><code>//create Db Connection
  List&lt;String&gt; sqlInsertQueries = getListOfInsertsQueries();
  for (String currentsql : sqlInsertQueries)
  {
    stmt.addBatch(currentsql);
  }
  stmt.executeBatch();
  conn.commit();
  </code></pre>
  
  <p>This code is very slow and it takes almost 5 minutes to be finished.</p>
  
  <p>Is there any idea how to make it work faster?</p>