You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2013/02/03 22:17:20 UTC

MySQL batch insert

Hi,

i didnt find any way to use batch insert for MySQL, would it be possible to
get it?

ex: INSERT INTO Foo (a,b,c) VALUES(1,2,3),(4,5,6);

Would be great to get some perf improvement for app having multiple inserts
in the same transaction.

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*

Re: MySQL batch insert

Posted by Romain Manni-Bucau <rm...@gmail.com>.
oops,

seems rewriteBatchedStatements=true in the jdbc url + <property
name="openjpa.jdbc.DBDictionary" value="batchLimit=-1"/> should do the same

sorry for the useless mail

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/2/3 Romain Manni-Bucau <rm...@gmail.com>

> Hi,
>
> i didnt find any way to use batch insert for MySQL, would it be possible
> to get it?
>
> ex: INSERT INTO Foo (a,b,c) VALUES(1,2,3),(4,5,6);
>
> Would be great to get some perf improvement for app having multiple
> inserts in the same transaction.
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>