List:General Discussion« Previous MessageNext Message »
From:hsv Date:December 30 2013 1:58pm
Subject:Re: Really slow batch insert??
View as plain text  
>>>> 2013/12/30 13:59 +0200, Cabbar Duzayak >>>>
We have a basic table, which is something like :


(id varchar50, productId varchar50, category varchar50)


In this table, ID is the primary key and we have a unique index on
(category, productId). And, there is a case where we want to do bulk
inserts (3000 inserts) using:


INSERT INTO (id, productId, category) VALUES (VALUES(category)


So, when we try to insert 3000 rows using this syntax with a single
statement, it takes ~ 3 seconds to execute this on an empty table.


BTW, innodb_flush_log_at_trx_commit is set to  2 for us.


I donmuch just for 3000 rows.
<<<<<<<<
I have nothing real to say about the slowness, but it looks as if in this case your
operation is the same as

REPLACE INTO (id, productId, category) VALUES (
and maybe that takes less time.

Thread
Really slow batch insert??Cabbar Duzayak30 Dec
  • Re: Really slow batch insert??Cabbar Duzayak30 Dec
  • Re: Really slow batch insert??hsv30 Dec