Re: IN vs EXISTS

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: IN vs EXISTS
Дата
Msg-id 20156.1212851950@sss.pgh.pa.us
обсуждение исходный текст
Ответ на IN vs EXISTS  (askel <dummy666@mail.ru>)
Список pgsql-general
askel <dummy666@mail.ru> 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

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: temporarily deactivate an index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Extracting data from deprecated MONEY fields