Re: IN vs EXISTS

Поиск
Список
Период
Сортировка
Искать
От
askel
Тема
Re: IN vs EXISTS
Дата
Msg-id
93a79e8c-e923-4a80-b373-bca674a3a464@z72g2000hsb.googlegroups.com
Список
Дерево обсуждения
IN vs EXISTS askel <dummy666@mail.ru>
Re: IN vs EXISTS "Adam Rich" <adam.r@sbcglobal.net>
Re: IN vs EXISTS Jeff Davis <pgsql@j-davis.com>
Re: IN vs EXISTS Tom Lane <tgl@sss.pgh.pa.us>
Tom,

I'm using 8.3.1. I did run EXPLAIN but have never familiarized myself
with how to read/use it beside simple comparing cost estimation and
whether there is any seq scan that can benefit from creating index.

Thanks for replying

On Jun 7, 11:19 am, t...@sss.pgh.pa.us (Tom Lane) wrote:
> askel  writes:
> > Performance is at least few times better when EXISTS is used.
>
> It really shouldn't be.  PG knows more possible plans for IN than
> EXISTS, so IN should pretty much always be equal or better ... unless
> the planner is making the wrong choice.  I speculate that you have
> out-of-date statistics or some such.  Have you compared EXPLAIN ANALYZE
> output for the two cases?  Which PG version are we talking about?
>
>                         regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления
От: Bojan
Дата:
От: Giorgio Valoti
Дата:
FAQ