Subject Re: [firebird-support] Re: Bug in firebird 1.5?? left joining
Author Arno Brinkman
Hi,

> > > select a.* from a where
> > > not exists(select * from b where a.id = b.id)
> >
> > Yes, this should be equivalent and probably faster when there are
> many
> > duplicates on the person field.
>
> Thanks for the info. Is there any perfomance difference between the
> above query and:
>
> select a.* from a where a.id not in (select id from b)
>
> The plans look the same, but my test tables are too small to show any
> difference is speed.

Internally a IN predicate with sub-select is converted to the same as a
EXISTS thus there should be no performance difference between those two.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://80.126.130.81