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)
Ответы: Re: An "obvious" index not being used  ("Daniele Varrazzo")
Список: pgsql-performance

Скрыть дерево обсуждения

An "obvious" index not being used  (Daniele Varrazzo, )
 Re: An "obvious" index not being used  (Tom Lane, )
  Re: An "obvious" index not being used  (Daniele Varrazzo, )
 Re: An "obvious" index not being used  ("Kevin Grittner", )
  Re: An "obvious" index not being used  ("Daniele Varrazzo", )
 Re: An "obvious" index not being used  (Francisco Reyes, )
  Re: An "obvious" index not being used  (Daniele Varrazzo, )
   Re: An "obvious" index not being used  (Tom Lane, )
    Re: An "obvious" index not being used  (Daniele Varrazzo, )

>>> Daniele Varrazzo <> 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 по дате сообщения:

От: "Daniele Varrazzo"
Дата:
Сообщение: Re: An "obvious" index not being used
От: "Lionel"
Дата:
Сообщение: Re: Which hardware ?