List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:February 9 2000 4:24pm
Subject:Re: Bad Queries
View as plain text  
>>>>> "Matthias" == Matthias Urlichs <smurf@stripped> writes:

Matthias> Hi,
Matthias> Michael Widenius:
Marc> Do you know how to kill a slow query automatically after 10 seconds?
>> Just let the perl do a "show processlist' every 5'th second and if any
>> queries have took more than 5 seconds, you can send a kill to it.
Matthias> What if the process is doing an extensive "copy to temp file"?

Matthias> MySQL 3.22.27 cannot kill such a process. Has this been fixed?

I just checked this code in MySQL 3.22 and couldn't find anything
where this could cause a problem (execpt if you get disk full).

At what kind of query have you seen this problem?

(I would need an EXPLAIN on the query or a repeatable example to be
able to comment).

The kill works by setting a flag in the thread structure. All loops in
that handles select's (in sql/ does the following check:

 if (join->thd->killed)

It would be nice to know exactly in which loop the thread is

What happened when you did a 'mysqladmin kill';  Did the thread got
marked as killed in 'mysqladmin proc' ?


Bad QueriesDannie M Stanley1 Feb
  • Re: Bad Queriessasha1 Feb
    • Re: Bad QueriesMarc Peiser3 Feb
      • Re: Bad Queriessasha3 Feb
        • Re: Bad QueriesMichael Widenius8 Feb
          • Re: Bad QueriesMarc Peiser8 Feb
            • Re: Bad Queriessinisa8 Feb
              • Re: Bad QueriesMarc Peiser8 Feb
                • Re: Bad Queriessinisa8 Feb
                • Re: Bad QueriesMichael Widenius9 Feb
                  • Re: Bad QueriesMatthias Urlichs9 Feb
                    • Re: Bad QueriesMichael Widenius10 Feb
  • Re: Bad QueriesDannie M Stanley1 Feb
  • Re: Bad Queriessasha2 Feb
  • Re: Bad QueriesDannie M Stanley3 Feb
  • Re: Bad QueriesDannie M Stanley3 Feb
    • Re: Bad QueriesThimble Smith3 Feb