On Wed, 3 Apr 2002 19:28:13 +0900
°í¼ø¹Î <[EMAIL PROTECTED]> wrote:

> My DB has many update queries and a few select queries. 
> Sometimes select queries take very long time so update can't
> proceed. I can kill the select query manually. But I can't check
> the status all the time. 
> 
> Are there any ways to kill slow query automatically? If you know,
> please let me know. Any information will be appreciated.

you can create a script (use php for example), and if you use UNIX-based system, you 
can also add a cron job to run the "kill" script.

principal :
1. show processlist
2. kill where Info of process is `select` and time of query is longer than XXX seconds.
3. put the script into cron job for every X minute.

-- 
Let's call it an accidental feature.
        -- Larry Wall

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to