On Fri, Sep 24, 1999 at 03:32:51PM +0100, Stuart Rison wrote:
...
> Try:
>
> SELECT tab1.pkey FROM <your_table> tab1 WHERE tab1.pkey NOT IN (SELECT
> tab2.pkey FROM <your_other_table> tab2.pkey);
>
> or else (faster):
>
> SELECT tab1.pkey FROM <your_table> tab1 WHERE NOT EXISTS (SELECT 1 FROM
> <your_other_table> tab2 WHERE tab1.pkey=tab2.pkey);
Maybe this is trivial, but...
Is there a simple way to see that/why the last query is faster?
Albert.
--
--------------------------------------------------------------------------- Post an / Mail to / Skribu al: Albert
Reiner<areiner@tph.tuwien.ac.at>
---------------------------------------------------------------------------