Re: SQL Humor

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Sat, 20 Aug 2005 00:56:04 +0200
Message-ID: <>

On 18 Aug 2005 15:13:28 -0700, Mikito Harakiri wrote:

>BTW, you triggered the other example: is EXISTS or IN faster?

Woops - forgot to add this to my previous reply:

Before thinking about speed, you should think about the difference between the two. IN can result in UNKNOWN; EXISTS can only result in TRUE or FALSE. Since UNKNOWN and FALSE are treated the same in a WHERE, WHEN, or HAVING clause, many people doon't notice the difference - until they start combining IN with NOT and getting unexpected results!

Only choose the faster version if they truly are equal!!

Best, Hugo


(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Sat Aug 20 2005 - 00:56:04 CEST

Original text of this message