I have a process that needs to run every X minutes to update certain information. It does not matter whether the query takes 10 seconds, 20 seconds or even a minute. What matters though, is that the information is updated at least every 10 minutes for example.
Because the query is slow and because the server is being used for other queries, it affects other users. This is the situation that I am trying to solve.
I would cpulimit
whichever process runs the query, but the process taking up all the resources is the MySQL server itself, so it seems like I need some MySQL specific setting.
It is a single MySQL query that's causing the server to freeze. I would like to limit the resources allocated to that specific query.