I'm having troubles with my MySql server. It's used mainly for storing production logs, but unfortunately it seems like it it too slow and i dont know if there is something i could do to improve it.Sometimes there is even few hours of delay. The log
database is working on MyISAM engine.
InnoDB is faster at concurrent INSERTs
. Switch to InnoDB.
In particular, that Processlist probably implies something else is happening with the table. Again, InnoDB is better at handling concurrency.
If practical, batch the inserts -- A single INSERT
with 100 rows runs about 10 times as fast as 100 single-row INSERTs
.
Having lots of indexes on the log table slows things down some.
The use of Summary Tables may avoid the need for lots of indexes.
See High speed ingestion for even better performance (within MySQL/MariaDB).
MyISAM has been removed from MySQL 8.0 and all "clustering" configurations. That is, your next upgrade may force you to change to InnoDB.