java jdbc-向mysql中插入50000条数据怎么那么慢。。。
程序员文章站
2022-05-10 14:12:24
...
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 {
@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
}