You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Stéphane Hanser <s....@omegames.com> on 2007/06/07 12:13:03 UTC
Optimizing a lot of requests at time
Hi,
Im currently programming a tool in order to migrate a database to another.
I have a lot of control to do and data to change. I wrote this tool in java
using ibatis to access both databases. However, I need to make several
hundreds of insert requests and it takes me a lot of time. I used a profiler
to analyze the source and noticed that each request is really time
consuming. I wondered if there was a way to speed it (by doing 1 000
requests at time for instance)
Thank you in advance,
Stéphane H.
RE: Optimizing a lot of requests at time
Posted by Stéphane Hanser <s....@omegames.com>.
This is exactly what I was looking for.
Thank you very much.
S. Hanser
_____
De : Marc.Heimann@prolifics.de [mailto:Marc.Heimann@prolifics.de]
Envoyé : jeudi 7 juin 2007 12:20
À : user-java@ibatis.apache.org
Objet : Re: Optimizing a lot of requests at time
Batches to the rescue!
Have a look at the SqlMap API, there are startBatch and executeBatch
statements.
In the docs is an example on how to use those.
HTH
Marc Heimann
Software Engineer
Prolifics - Enterprise Solution Division - IBM Business Partner
Prolifics Deutschland GmbH
Notkestr. 3, D-22607 Hamburg
phone +49 (0)40 890 667-70
fax +49 (0)40 890 667-99
<ma...@prolifics.de> marc.heimann@prolifics.de
2007 IBM Award Winner for Overall Technical Excellence
SOA... Building Future Business Solutions Today
Handelsregister: Hamburg, HRB 89903
Geschäftsführer: Ulrich Frotscher
Stéphane Hanser <s....@omegames.com> wrote on 07.06.2007 12:13:03:
> Hi,
>
> Im currently programming a tool in order to migrate a database to
> another. I have a lot of control to do and data to change. I wrote
> this tool in java using ibatis to access both databases. However, I
> need to make several hundreds of insert requests and it takes me a
> lot of time. I used a profiler to analyze the source and noticed
> that each request is really time consuming. I wondered if there was
> a way to speed it (by doing 1 000 requests at time for instance)
>
> Thank you in advance,
>
> Stéphane H.
Re: Optimizing a lot of requests at time
Posted by Ma...@prolifics.de.
Batches to the rescue!
Have a look at the SqlMap API, there are startBatch and executeBatch
statements.
In the docs is an example on how to use those.
HTH
Marc Heimann
Software Engineer
Prolifics Deutschland GmbH
Notkestr. 3, D-22607 Hamburg
phone +49 (0)40 890 667-70
fax +49 (0)40 890 667-99
marc.heimann@prolifics.de
2007 IBM Award Winner for Overall Technical Excellence
SOA... Building Future Business Solutions Today
Handelsregister: Hamburg, HRB 89903
Geschäftsführer: Ulrich Frotscher
Stéphane Hanser <s....@omegames.com> wrote on 07.06.2007 12:13:03:
> Hi,
>
> I’m currently programming a tool in order to migrate a database to
> another. I have a lot of control to do and data to change. I wrote
> this tool in java using ibatis to access both databases. However, I
> need to make several hundreds of insert requests and it takes me a
> lot of time. I used a profiler to analyze the source and noticed
> that each request is really time consuming. I wondered if there was
> a way to speed it (by doing 1 000 requests at time for instance)
>
> Thank you in advance,
>
> Stéphane H.