????wordend ????????

???????????(???????????)???????
?????????????????????????
??????????????????

????3?????PreparedStatement + ??????

????public void exec3(Connection conn){

????try {

????conn.setAutoCommit(false);

????Long beginTime = System.currentTimeMillis();

????PreparedStatement pst = conn.prepareStatement("insert into t1(id) values (?)");

????for(int i=1;i<=100000;i++){

????pst.setInt(1?? i);

????pst.addBatch();

????if(i%1000==0){//???????ò?????С;??50??100??500??1000???

????pst.executeBatch();

????conn.commit();

????pst.clearBatch();

????}

????}

????Long endTime = System.currentTimeMillis();

????System.out.println("pst+batch??"+(endTime-beginTime)/1000+"??");

????pst.close();

????conn.close();

????} catch (SQLException e) {

????// TODO Auto-generated catch block

????e.printStackTrace();

????}

????}

??????Oracle 10g?в?????????

????1?????statement???142??;

????2?????PreparedStatement???56??;

????3?????PreparedStatement + ??????????

????a.50????????Σ????5??;

????b.100????????Σ????2??;

????c.1000???????????Σ????1??;

??????????????ó???????????jdbc???????????????????????????????(PreparedStatement + ??????)????????

?????????sqlserver 2000???в??????????????????5??????????????Oracle???????????????????????????