List:MySQL on Win32« Previous MessageNext Message »
From:Michael Widenius Date:September 25 1999 6:35am
Subject:MYSQL using 100% CPU constantly...
View as plain text  
>>>>> "John" == John Peat <johnpeat@stripped> writes:

John> Hi
John> I've been using the shareware WIN32 version (3.21.29a-gamma-debug) on an WIN98
John> machine, accessing it through PHP3/Apache 1.3.6 - and I've run into a 'big'
John> problem.

John> Running 'complex' or 'large' SQL requests seems to frequently cause MYSQL to
John> 'loop' - eating CPU (upto 100%) constantly but returning no results...  

John> The PHP3 Page dies eventually without returning content of course, but MYSQL
John> continues to clock up CPU indefinately...

John> Before I start trying to explain the SQL, debug the requests etc. etc. - I
John> wondered if anyone else was aware of a 'looping' bug such as this and whether
John> it may be fixed in the later/registered versions...

John> The worst offenders seem to be SQL requests containing lots of 'LIKE'
John> comparisons on TEXT and VARCHAR fields - usually 'OR'ed together...


We are not aware of any 'loop' bugs in any MySQL version, but on the
other hand its fairly easy in SQL to make a select that will involve a 
full join and if this is done on many tables, it will take forever.

In any case, you should always be able to do 'mysqladmin proc' and
'mysqladmin kill #' to find and kill the offending query.

One can catch a lot of 'illegal queries' by setting the max_join_size
variable when you start mysqld. (More about this in the MySQL manual)

If you can post the output from EXPLAIN on the problem query we may be 
able to give some pointers of what is going on.

The registered version of MySQL is a bit faster and has a lot of new
optimizations and it may help, but without looking at the query it's
hard to guarantee it.

MYSQL using 100% CPU constantly...John Peat24 Sep
  • MYSQL using 100% CPU constantly...Michael Widenius25 Sep
    • RE: create table in 3.21.31Dennis Thrysøe25 Sep
      • RE: create table in 3.21.31Paul DuBois25 Sep
      • RE: create table in 3.21.31Michael Widenius25 Sep
      • Re: create table in 3.21.31Tonu Samuel26 Sep
  • Re: MYSQL using 100% CPU constantly...John Peat26 Sep
    • Re: MYSQL using 100% CPU constantly...Michael Widenius26 Sep
  • Re: MYSQL using 100% CPU constantly...John Peat26 Sep