List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:October 21 2009 6:27am
Subject:Re: Low performance due high network latency - batching ?
View as plain text  
Well, it's not exactly a clean approach, but if those are the limits you
have to work within, so be it :-)

I suspect you could gain some more performance by using MySQL's multiple
select syntax. It's rougly like this:

insert into *table* (*field*, *field*, *field*) values (*value*, *value*, *
value*), (*value*, *value*, *value*), (*value*, *value*, *value*);

and so on :-) Have a look at for more info.

On Wed, Oct 21, 2009 at 1:09 AM, Bermejo, Rodrigo (GE Infra, Aviation) <
rodrigo.bermejo@stripped> wrote:

> Hola List /.
> We are facing a preformance issue with a desktop application which
> connects remotly to a Mysql / DB ( ping times 300-800ms).
> We do not have time to invest in modifications to create a 2-tier ...
> Web application
> The initial plan was to implement a Client cache or a local DB (mysql
> slave or XML files).
> After reviwing the code and the sql logs I figured out there are a lot
> of insert/updates and replaces within loops.
> Sometimes there are more than 200 inserts statments coming for a loop.
> What I did was to create a long string with all statments separated with
> semicolons (batching) and then just send them all in just one statment.
> This reduced the major application use case time in 300%
> I am planning to write some code that can keep all "modification"
> statments in memory until a select is needed <so then send first the
> commands in memory and then the select>
> Any of you have some experience using this approach /?
> Any drawback you can see /?
> Thanks for your comments.
> -r.

That which does not kill you was simply not permitted to do so for the
purposes of the plot.

Low performance due high network latency - batching ?Aviation) GE Infra21 Oct
  • Re: Low performance due high network latency - batching ?Johan De Meersman21 Oct
  • Re: Low performance due high network latency - batching ?Dan Nelson21 Oct