I’ve started using the slow query log analyzer at:
It seems that a fair number of slow queries are one-row INSERTs into InnoDB tables. By slow, I mean that they take 100-200 milliseconds.
I already have innodb_flush_log_at_trx_commit set to 2.
In some of the cases, there is one UNIQUE index in the table in question (in addition to other INDEXes), but I don’t think this should matter, unless the index is being pulled from disk.
Any thoughts on where I can look to bring these times down?