Tom Lane wrote:
>
> Theo Kramer <theo(at)flame(dot)co(dot)za> writes:
> > The query is
>
> > select accountdetail.domain from accountdetail where
> > accountdetail.domain not in
> > (select accountmaster.domain from accountmaster);
This takes more than 5 hours and 30 minutes.
> Try something like
>
> select accountdetail.domain from accountdetail where
> not exists (select accountmaster.domain from accountmaster where
> accountmaster.domain = accountdetail.domain);
This takes 5 seconds - wow!
> I believe this is in the FAQ...
Will check out the FAQs. Many thanks.
--------
Regards
Theo