Re: IN vs EXIIST

Поиск
Список
Период
Сортировка
От Jean-Christian Imbeault
Тема Re: IN vs EXIIST
Дата
Msg-id 3D89AF55.4000107@mega-bucks.co.jp
обсуждение исходный текст
Ответ на IN vs EXIIST  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список pgsql-general
Henshall, Stuart - WCP wrote:
>
> AND invoice_li.invoice_id=sq_inv_li.invoice_id
> is the bit that tells it to check the id of the sub query and parent are
> the same.
> If you don't have this bit I believe it makes the subquery kind of
> piontless

You are right. I had "ordered" my data set in between running the
queries. When I added some new data running the EXISTS query without the
  AND a.id=b.id bit the results were fast *and* wrong ;)

I'm still scratching my head as to why EXISTS isn't faster *and* why
EXPLAIN says it should be ...

Jc


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

Предыдущее
От: "Jan Weerts"
Дата:
Сообщение: Re: IN vs EXIIST
Следующее
От: Ciprian Popovici
Дата:
Сообщение: some optimization?