Re: IN optimization in 7.2 ?????

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: IN optimization in 7.2 ?????
Дата
Msg-id 200202181542.g1IFgjY21373@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: IN optimization in 7.2 ?????  (hubert depesz lubaczewski <depesz@depesz.pl>)
Ответы Re: IN optimization in 7.2 ?????
Список pgsql-general
hubert depesz lubaczewski wrote:
> On Mon, Feb 18, 2002 at 09:52:19AM -0500, Bruce Momjian wrote:
> > Not that I know of.
>
> strange. what could lead to this results then?
> i used to think that IN (SELECT ...) is the slowest possible way at all.
>
> depesz
>
> p.s. of course both select's use indices, and table is vacuumed

I have always wondered this too.  Seems IN evaluates the entire query
while EXISTS evaluates it for each row, or at least that is how I
understand it, so saying EXISTS is always faster may be wrong.
Comments?


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: IN optimization in 7.2 ?????
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Can somebody save my bacon?