How to set a maximum execution time for a mysql query?

后端 未结 5 2148
萌比男神i
萌比男神i 2020-11-27 21:20

I would like to set a maximum execution time for sql queries like set_time_limit() in php. How can I do ?

5条回答
  •  余生分开走
    2020-11-27 21:49

    pt_kill has an option for such. But it is on-demand, not continually monitoring. It does what @Rafa suggested. However see --sentinel for a hint of how to come close with cron.

提交回复
热议问题