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