Re: An "obvious" index not being used

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: An "obvious" index not being used
Дата
Msg-id 485A1CA6.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на An "obvious" index not being used  (Daniele Varrazzo <piro@develer.com>)
Ответы Re: An "obvious" index not being used  ("Daniele Varrazzo" <piro@develer.com>)
Список pgsql-performance
>>> Daniele Varrazzo <piro@develer.com> wrote:

>      select count(*) from foo
>      where foo.account_id in (
>          select id from accounts where system = 'abc');

>   Total runtime: 13412.226 ms

Out of curiosity, how does it do with the logically equivalent?:

select count(*) from foo
where exists (select * from accounts
  where accounts.id = foo.account_id
    and accounts.system = 'abc');

-Kevin

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

Предыдущее
От: Howard Cole
Дата:
Сообщение: Re: Tsearch2 Initial Search Speed
Следующее
От: "Daniele Varrazzo"
Дата:
Сообщение: Re: An "obvious" index not being used