← Back to team overview

maria-discuss team mailing list archive

Re: The insert performance issue

 

林澤宇 <jerry08291021@xxxxxxxxx> writes:

> I use a file include 100000 insert command statements to test the insert
> performanc .
> On local server ,the Mariadb spent about 20 second to insert data;but on
> remote server ,the MariaDB spent about 30 second to insert data .

> Why the MariaDB has about 10 second gap ?
> Maybe the network should to cause some latancy ,but the time should not
> have so long .

Why do you think 10 seconds is unexpected?

If you are sending 100000 individual queries from a single client thread,
that is 100000 network roundtrips. Extra 10 seconds for that seems
reasonable, in fact it sounds quite fast to me (0.1 ms network roundtrip).

If you want better performance on remote server, try sending many statements
in one roundtrip using multi-statement protocol, or running many queries in
parallel from the client to overlap the roundtrips.

 - Kristian.


Follow ups

References