Maison > Article > base de données > java jdbc-向mysql中插入50000条数据怎么那么慢。。。
mysqljava jdbcsql数据
package cn.itcast.bath;
import java.sql.Connection;
import java.sql.PreparedStatement;
import org.junit.Test;
import cn.itcast.jdbc.JDBCUtils;
public class Bath {
<code>@Testpublic void demo1(){ Connection conn=null; PreparedStatement stat=null; long start = System.currentTimeMillis(); try { conn=JDBCUtils.getConnection(); String sql ="insert into person values(?,?,?)"; stat=conn.prepareStatement(sql); for (int i = 1; i </code>
}