>>>> 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.