Home  >  Article  >  Database  >  java jdbc-向mysql中插入50000条数据怎么那么慢。。。

java jdbc-向mysql中插入50000条数据怎么那么慢。。。

WBOY
WBOYOriginal
2016-06-06 09:36:331267browse

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>

}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn