Re: Non Matching Records in Two Tables

Поиск
Список
Период
Сортировка
От chester c young
Тема Re: Non Matching Records in Two Tables
Дата
Msg-id 20060214210829.79695.qmail@web54302.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Non Matching Records in Two Tables  (Ken Hill <ken@scottshill.com>)
Ответы Re: Non Matching Records in Two Tables
Список pgsql-sql
> Here is my query SQL:
> 
> SELECT key100 FROM ncccr10
> WHERE ncccr10.key100 NOT IN (SELECT key100 FROM ncccr9);
> 
> It is is running after 30 minutes. Here is the query plan:
>

I would try an outer join:

select a.key100
from ncccr10 a
left join ncccr9 b on( key100 )
where b.key100 is null;

also (hate to be obvious) have you analyzed lately?


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Non Matching Records in Two Tables
Следующее
От: Maciej Piekielniak
Дата:
Сообщение: create table and data types