Comments on: 3 handy tools to remove problematic MySQL processes https://www.percona.com/blog/3-handy-tools-to-remove-problematic-mysql-processes/ Fri, 12 May 2023 20:44:34 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Masroor Farooqi https://www.percona.com/blog/3-handy-tools-to-remove-problematic-mysql-processes/#comment-10588517 Tue, 03 Mar 2015 04:51:25 +0000 https://www.percona.com/blog/?p=28148#comment-10588517 Excellent review of these tools and helpful examples to illustrate them. It’s good to have these tools under your belt for situations when they are needed.

However, I think Aftab’s comment was getting to the root of the problem. One needs to be worried about long queries, but I would be equally worried about having a process having the power of a sledgehammer. In a case of a simple of a badly formed select query doing a table scan can be killed easily by any of these tools. But imagine an update query running in a MyISAM table. The update runs for a long time and the gets quashed by before all the updates are complete. Now I have committed the carnal sin of a DBA; I have left the database in an inconsistent state – definitely not cool.

Even in a transaction safe world, I do an insert/update, and half way through Brutus (my pt-kill process name :-)) comes and kills the process. Now the database has to do a rollback. We all know the rollback is an expensive process, so at this point I’m stuck between a rock and a hard place – also not cool.

The point I’m trying to make is that automated tools are excellent, but they come at a price. In the database word the price is a risk (small as it may be) that there may be unintended consequences. As long as we are ready to take those risks – bring them on.

]]>
By: Jaime Crespo https://www.percona.com/blog/3-handy-tools-to-remove-problematic-mysql-processes/#comment-10577411 Sat, 28 Feb 2015 14:19:53 +0000 https://www.percona.com/blog/?p=28148#comment-10577411 MAX_STATEMENT_TIME twitter’s feature is also in upstream 5.7, both as a SELECT syntax http://dev.mysql.com/doc/refman/5.7/en/select.html and as a global an session variable: http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_statement_time

]]>
By: Aftab https://www.percona.com/blog/3-handy-tools-to-remove-problematic-mysql-processes/#comment-10573596 Fri, 27 Feb 2015 15:19:35 +0000 https://www.percona.com/blog/?p=28148#comment-10573596 I think you may also highlight the need to identify and optimise slow queries.

]]>