MySQL Forums
Forum List  »  Performance

Boolean result optimization
Posted by: Frank Grunwald
Date: February 10, 2005 11:20AM

Hello all,

My question is quite simple :
Does mysql optimize query like
SELECT COUNT(*) > 0 FROM t1 where f1=42;
by stopping COUNT(*) processing as soon as he finds a row matching the condition (or does he process COUNT(*) and compares it to 0) ?

Thx for your ideas about this


Options: ReplyQuote

Written By
Boolean result optimization
February 10, 2005 11:20AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.