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

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

WBOY
Release: 2016-06-06 09:36:33
Original
1289 people have browsed it

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>
Copy after login

}

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template