Re: More correlated (?) index woes

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: More correlated (?) index woes
Дата
Msg-id CAGrpgQ8zau=VpUfw48Qkkdvc_8jf-E52aZq3DeFS2KVnQWm6pw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: More correlated (?) index woes  (Geoff Winkless <pgsqladmin@geoff.dj>)
Ответы Re: More correlated (?) index woes  (Geoff Winkless <pgsqladmin@geoff.dj>)
Список pgsql-general

On Tue, Mar 29, 2016 at 3:47 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
On 28 March 2016 at 20:23, I wrote:
Table pa has 7522676 rows, 4834042 of which have field1 NULL, so it's absolutely not reasonable to expect this to be an optimal strategy.
It occurred to me that even though the majority of values are NULL, there are ​
 
​1691 unique values in pa.field1, so I suppose it might seem more attractive to the planner than it should do (that's more unique values than there are scdate entries).


Perhaps a partial index like "create index pa_sc_id_pidx on pa (sc_id) with (fillfactor=100) where field1 IS NULL;" will help?

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

Предыдущее
От: Slava Bendersky
Дата:
Сообщение: bdr replication
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: bdr replication