rformance can be better if changes to the database are batched: turn off autocommit; add multiple SQL statements using the Statement.addBatch() method; execute Statement.executeBatch().
B. Larsen, and C. Aone. KDD '99: Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, page 16--22. New York, NY, USA, ACM Press, (1999)