批处理

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();
View Code

 

posted @ 2017-08-30 20:09  燕大梁朝伟  阅读(68)  评论(0编辑  收藏  举报