maria-discuss team mailing list archive
Mailing list archive
Re: The insert performance issue
Am 11.03.2016 um 05:10 schrieb Jerry Lin:
In local server ,I also use -h <ip> option to login my mariadb not
If this ip is on local server ,does the mariadb can transfer the ip to
local soket ?
no, only when you use "localhost" and not "127.0.0.1"
If not ,I think the command " mysql -h db1 -utest -ptest -D IST <
insert_file.sql" should not has gap ?
and how do the data of "insert_file.sql" come to the server?
besides that a local interface is always faster then network
try it out - your own IP on a linux machine is handeled by the loopback
device - proven by iptables rules for "-i lo" hit also when call the
2016-03-10 22:46 GMT+08:00 Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx
林澤宇 <jerry08291021@xxxxxxxxx <mailto:jerry08291021@xxxxxxxxx>>
> 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
that is 100000 network roundtrips. Extra 10 seconds for that seems
reasonable, in fact it sounds quite fast to me (0.1 ms network
If you want better performance on remote server, try sending many
in one roundtrip using multi-statement protocol, or running many
parallel from the client to overlap the roundtrips.
Description: OpenPGP digital signature