1 ps = con.prepareStatement(sql); 2 long start = System.currentTimeMillis(); 3 for (int i = 0; i < 1000; i++) { 4 ps.setString(1, "qq"+i); 5 ps.addBatch(); 6 } 7 ps.executeBatch();