Subject RE: [firebird-support] SQL NOT IN
Author Dion
Thanks guys.







_____

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Rick Debay
Sent: 22 November 2005 06:54 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] SQL NOT IN



> Wouldn't it be the same as the original query ?

It would perform differently. I know this from experience as the IN
gets evaluated every time, and when I changed to an EXISTS the speed
increased dramatically.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: Tuesday, November 22, 2005 9:50 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] SQL NOT IN

Lucas Franzen wrote:

>Dion schrieb:
>
>
>>select fetchedhrs.forkliftcell
>>
>> from fetchedhrs
>>
>> where fetchedhrs.forkliftcell not in
>>
>> (select forklift.forkliftcell from forklift)
>>
>>
>
>
>select fetchedhrs.forkliftcell
>from fetchedhrs
>WHERE NOT EXISTS
> ( SELECT * from forklift
> WHERE FETCHEDHRS.FORKLIFTCELL = FORKLIFT.FORKLIFTCELL )
>
>
>(sorry for any typo)
>
>Luc.
>
>
Hi Luc !

Wouldn't it be the same as the original query ? (Because IN is converted
to EXISTS internally)

I think you suggestion should work as the original query should work
too.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br




++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links









++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





_____

YAHOO! GROUPS LINKS



* Visit your group "firebird-support
<http://groups.yahoo.com/group/firebird-support> " on the web.


* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>


* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.



_____



[Non-text portions of this message have been removed]