Subject | Re: select etc. |
---|---|
Author | Michael Vilhelmsen |
Post date | 2003-03-18T11:59:16Z |
Thank you
This seems to be the fastes approch I have experienced.
Michael
--- In ib-support@yahoogroups.com, Svein Erling Tysvaer
<svein.erling.tysvaer@k...> wrote:
This seems to be the fastes approch I have experienced.
Michael
--- In ib-support@yahoogroups.com, Svein Erling Tysvaer
<svein.erling.tysvaer@k...> wrote:
> At 12:03 18.03.2003 +0100, you wrote:MYFIELD1 FROM
> >SELECT * FROM MYTABLE1 WHERE MYTABLE1.MYFIELD1 NOT IN (SELECT
> >MYTABLE2)table,
>
> This will work fine as long as you only have a few records in each
> but the subselect is probably executed once for every row, soyou'll notice
> that this select will become slower as the number of records in thetables
> increases. Generally, doingMYTABLE2
>
> SELECT <whatever> FROM MYTABLE1 WHERE NOT EXISTS (SELECT 1 FROM
> WHERE MYTABLE2.<field> = MYTABLE1.<field>)
>
> is a lot quicker.
>
> HTH,
> Set