mysql优化
<code>public int addTypes(List babyList) { String sql = "insert into type (typeid,url) values (?,?) "; Connection conn = dbhelper.getConnection(driver,url,username,upwd); int result = 0; PreparedStatement stmt =null; try { stmt = conn.prepareStatement(sql); for(int i=0;i<babyList.size();i++){ stm<div style="color:transparent">本文来源gaodai.ma#com搞##代!^码网(</div>t.setInt(1, babyList.get(i).getTypeId()); stmt.setString(2, babyList.get(i).getUrl()); stmt.addBatch(); } stmt.executeBatch(); } catch (Exception e) { e.printStackTrace(); }finally{ if (stmt != null) { try { stmt.close(); } catch (SQLException e) { e.printStackTrace(); } } dbhelper.closeCon(conn); } return result;}1分钟才插入3000条数据,如何变快。</code>