« Cleaning up the data | Main | Configuring Sendmail in Drupal 6 »
February 01, 2011
Identify and kill slow queries
I've run into problems where a Drupal Views query involving Users executes extremely slow. Here is how to identify and kill it:
Login to mysql
$ mysql -u [dbuser] -h [dbhost] -p
Show processes:
mysql> show processlist;
mysql> show full processlist;
mysql> show processlist\G;
Kill query:
mysql> kill query 1831;
Posted by kkwaiser at February 1, 2011 03:44 PM