Re: working around JSONB's lack of stats?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: working around JSONB's lack of stats?
Дата
Msg-id CAHyXU0xpr5C+x1RmRzo9ppGZnVYq_8d2htojHisE-KHSj2YdOA@mail.gmail.com
обсуждение исходный текст
Ответ на working around JSONB's lack of stats?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-performance
On Tue, Jan 27, 2015 at 1:06 AM, Josh Berkus <josh@agliodbs.com> wrote:
> Folks,
>
> Currently, JSONB fields don't have statistics, and estimate a flat 1%
> selectivity.  This can result in poor query plans, and I'm wondering if
> anyone has a suggested workaround for this short of hacking a new
> selectivity function.  For example, take the common case of using JSONB
> to hold a list of "tags" for tagging documents:

hm,  Why stop at jsonb?  What's needed is a way to override the
planner's row estimate in a general way.

merlin


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

Предыдущее
От: Marc Mamin
Дата:
Сообщение: Re: Why is GIN index slowing down my query?
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: why pg_class.relfrozenxid needs to be updated for frozen tables (where all rows have xmin=2)?