I have a PHP script that in each run inserts a new line in Mysql db (with a relatively small amount of data ..) I have more than 20 queries per second, and this makes my processor scream for help.
I am using the sql method INSERT DELAYED with the MyISAM engine (although I just notice that INSERT DELAYED does not work with MyISAM).
My main concern is loading my processor, and I started looking for ways to store this data using more processor-friendly solutions.
My first idea was to write this data to the hourly log files and once an hour to extract data from the logs and paste them into the database immediately.
Perhaps the best idea is to use NoSQL DB instead of log files, and then once an hour to insert data from NoSQL into Mysql ..
I have not tested any of these ideas yet, so I really don't know if I can reduce the CPU load or not. I wanted to ask if someone could help me find the right solution that would have the lowest impact on my processor.
source share