Using MySQLTunerSkript be helpful to find out the source of issue- what is wrong with the serve and cause the slow performance. However here are few assumed possibility behind this and solutions as well;
Possible reasons of slow performance of MySQL server might be due to:
◘ Slow queries;
◘ Too many connections;
◘ Too many queries per second;
◘ Or any other reason may be;
Need to tune the database. This is a complicated process with many variables and decision trees. If you have a script that runs lots of SQL and slows down your DB, and your cpu and memory usage are fine while it's running, then you are probably running into I/O problems. i.e. You are hammering the disk. You need to look through the SQL used in the script and tune it. For example, it might be generating lots of full table scans or creating too many transaction logs that are slowing down the DB. To start with, I can check if any unneccessary full table scans are taking place, and see if can add indexes to the relevant columns to reduce the I/O and then report back and can go from there.
May be you are you're inserting records like this way:
INSERT INTO table1 (field1, field2) VALUES ("data1", "data2");
INSERT INTO table1 (field1, field2) VALUES ("data1", "data2");
Sending a new query each time, need to INSERT something is bad.
INSERT INTO table1 (field1, field2) VALUES ("data1", "data2"),
("data1", "data2");