Re: avoiding seq scans when two columns are very correlated

Поиск
Список
Период
Сортировка
От Ruslan Zakirov
Тема Re: avoiding seq scans when two columns are very correlated
Дата
Msg-id CAMOxC8stcOyn1HyCfmzwjki7EQ4edqLqNYv+v=Lt9Hq7rHeL5w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: avoiding seq scans when two columns are very correlated  (Stuart Bishop <stuart@stuartbishop.net>)
Список pgsql-performance
On Tue, Nov 15, 2011 at 11:08 AM, Stuart Bishop <stuart@stuartbishop.net> wrote:
> On Fri, Nov 11, 2011 at 10:01 PM, Ruslan Zakirov <ruz@bestpractical.com> wrote:
>> Hello,

[snip]

>> In application such wrong estimation result in seq scan of this table
>> winning leading position in execution plans over other tables and
>> index scans.
>>
>> What can I do to avoid this problem?
>
> Does a partial index help? CREATE UNIQUE INDEX foo_idx ON mytab(id)
> WHERE id = EffectiveId

It doesn't help. Probably reason is the same as for partitions.

>
>
> --
> Stuart Bishop <stuart@stuartbishop.net>
> http://www.stuartbishop.net/
>



--
Best regards, Ruslan.

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

Предыдущее
От: Mario Weilguni
Дата:
Сообщение: Re: Large number of short lived connections - could a connection pool help?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: What's the state of postgresql on ext4 now?