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

От: Kevin Grittner
Тема: Re: "SELECT .. WHERE NOT IN" query running for hours
Дата: ,
Msg-id: 4D2B19BE0200002500039215@gw.wicourts.gov
(см: обсуждение, исходный текст)
Ответ на: Re: "SELECT .. WHERE NOT IN" query running for hours  (Scott Carey)
Ответы: Re: "SELECT .. WHERE NOT IN" query running for hours  (Scott Carey)
Список: pgsql-performance

Скрыть дерево обсуждения

"SELECT .. WHERE NOT IN" query running for hours  (Γιωργος Βαλκανας, )
 Re: "SELECT .. WHERE NOT IN" query running for hours  (Mladen Gogala, )
  Re: "SELECT .. WHERE NOT IN" query running for hours  (Γιωργος Βαλκανας, )
   Re: "SELECT .. WHERE NOT IN" query running for hours  (Mladen Gogala, )
    Re: "SELECT .. WHERE NOT IN" query running for hours  (Robert Haas, )
   Re: "SELECT .. WHERE NOT IN" query running for hours  (Scott Carey, )
    Re: "SELECT .. WHERE NOT IN" query running for hours  ("Kevin Grittner", )
     Re: "SELECT .. WHERE NOT IN" query running for hours  (Scott Carey, )

Scott Carey <> wrote:

> Often, the best query plans result from 'LEFT JOIN WHERE right
> side is NULL' rather than NOT EXISTS however.  I often get
> performance gains by switching NOT EXISTS queries to LEFT JOIN
> form.

Even in 8.4 and later?  I would think that the anti-join that Tom
added in 8.4 would always perform at least as well as the LEFT JOIN
technique you describe.

-Kevin


В списке pgsql-performance по дате сообщения:

От: Scott Carey
Дата:
Сообщение: Re: "SELECT .. WHERE NOT IN" query running for hours
От: Rauan Maemirov
Дата:
Сообщение: Re: Problems with FTS