I have an insert statement that inserts a BLOB into the table, and this statement is executed in a loop for about 100 times. I would like to be able to batch the individual statements. Can it be done? Will it be faster than issuing 100 different statements to the connection.
you can try something like this... Statement statement = connection.createStatement(); //whatever you are looping through while(true){ String sqlString = "Insert into table (name)values ('" + name + "')"; statement.addBatch(sqlString); } statement.executeBatch();