Re: [mysql 4.0.14-nt] MySQL eats my CPU with speical SELECT statement
Alexander Keremidarski <[email protected]>
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Frank Schönheit wrote:
> Hi Alexander,
<cut>
> What I wanted (means: failed :) to express was that I associated the "0
> = 1" I saw with the "WHERE 0 = 1" which OOo regularily uses to determine
> the structure of a result set.
Really?
I would never expect this!
With MySQL there is much nicer way to check if query syntax is Ok and it works
with all queries and all possible WHERE, GROUP BY and HAVING clauses.
... LIMIT 0;
Seeing LIMIT 0 MySQL will just return empty set.
I agree with you about 1 = 0 optimization. It works as you say for WHERE clauses.
EXPLAIN on such query you will see it qualifies it a "Impossible WHERE"
>>Yes it is very slow, but final result is expected given that HAVING 0 = 1 is
>>always false. MySQL did not hang, nor machine did. CPU usage remain at usual level
>>- no noticeable slowdown caused by MySQL.
>
>
> Hmm. You mean I have migrate to Linux? :) Okay, that's becoming
> off-topic ... :)
No! I mean that I gave it a try and there were nothing wrong with CPU usage.
> Thanks & Ciao
> Frank
Best regards
--
Are you MySQL certified? -- http://www.mysql.com/certification
For technical support contracts, visit https://order.mysql.com/?ref=msal
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski <[email protected]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/[email protected]