Re: "SELECT .. WHERE NOT IN" query running for hours

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: "SELECT .. WHERE NOT IN" query running for hours
Дата
Msg-id AANLkTimPFtZzR=L_fztok-xcKiQYvgQAiFt=AtY8_9+U@mail.gmail.com
обсуждение исходный текст
Ответ на Re: "SELECT .. WHERE NOT IN" query running for hours  (Mladen Gogala <mladen.gogala@vmsinfo.com>)
Список pgsql-performance
2011/1/10 Mladen Gogala <mladen.gogala@vmsinfo.com>:
> Well, I really hoped that Bruce, Robert or Greg would take on this one, but
> since there are no more qualified takers, I'll take a shot at this one. For
> the "NOT IN (result of a correlated sub-query)", the sub-query needs to be
> executed for every row matching the conditions on the driving table, while
> the   !EXISTS is just a complement of join. It's all in the basic set theory
> which serves as a model for the relational databases.

As Scott says, the real problem is the NULL handling.  The semantics
are otherwise similar.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: plan question - query with order by and limit not choosing index depends on size of limit, table
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Problems with FTS