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

John> Thanks for the reply!!
John> Sadly, what's most interesting about the problem is that it's not a joined
John> query - it's a query against only one table!!

John> I'm not familiar enough with MySQL as yet (my full time job is with Oracle
John> so I'll get there!!) to know how to explain/export objects etc - but an
John> example of the SQL would be

John> select field,field...
John> from    table
John> where ((description REGEXP "one" or description REGEXP "two" or description
John> REGEXP "three" ) or (details REGEXP "one" or details REGEXP "two" or details
John> REGEXP "three" ) )

Hi!

First a note:

You can get the above REGEXP much faster by doing:

select field,field...from    table
where description REGEXP "one|two|three|" or details REGEXP "one|two|three";

The problem with the above is of course that it doesn't use keys, but
MySQL has to do a full table scan of the table. You can solve this by
doing a word table with the interesting words (but that's another story)

This could be a problem with the REGEXP library.  You can check this
by substiuting the REGEXP with LIKE "%work%";  Check if this helps!

<cut>

John> That said - the most interesting thing just happened - I ran 2 queries to
John> get the SQL content - both ran fine - I then ran MyAdmin to get a 'dump' of
John> the table structure to include in this mail and on attempting to connect,
John> MySQL just ran upto 90+% CPU and stuck there!!!

I don't think this is a problem with the shareware version, but if you 
want, I can give you access to the registered version so that you can
check this.

If this problem is repeatable, you can always ftp the offending table
to ftp://www.mysql.com/pub/mysql/secret and I will test this myself!

John> I suspect MySQL may be contending with something else already installed on
John> this PC (there's plenty of software on here!!).  Latest additions (as MySQL
John> worked without problems for the first week or so that I used it) are Alliare
John> JRun and a revised network config due to a new network card.

John> Therefore - a question if I may - Does MySQL attempt to 'find'/ping any
John> 'default' network addresses or ports - e.g. could being detached from a
John> network (this is a portable you see) cause any problems perhaps??

A portable should work fine.  I don't know of any reason why you
should get the above behaveour.

John> Other than that, I'm well confused - although I'll have a good old look into
John> the fine O'Reilly book I have next to me right now and I'll see if I can get
John> any closer to the 'nub' of things...

It looks like for me to be able to help you, I would need to be able
to repeat your problem!

Regards,
Monty
Thread
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