Re: working around JSONB's lack of stats?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: working around JSONB's lack of stats?
Дата
Msg-id CAEYLb_VsR0GDpFkuYKCa6srN4yk2K+NkLUi0a5heXtksAd00ag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: working around JSONB's lack of stats?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-performance
On Wed, Jan 28, 2015 at 3:42 PM, Josh Berkus <josh@agliodbs.com> wrote:
> jsonb_col @> '[ "key1" ]'
> or jsonb_col ? 'key1'
>         if in MCE, assign % from MCE
>         otherwise assign 1% of non-MCE %
>
> jsonb_col @> '{ "key1": "value1" }'
>         if in MCE, assign MCE% * 0.1
>         otherwise assign 0.01 of non-MCE %
>
> Does that make sense?

I suspect it makes a lot less sense. The way people seem to want to
use jsonb is as a document store with a bit of flexibility. Individual
JSON documents tend to be fairly homogeneous in structure within a
table, just like with systems like MongoDB. Strings within arrays are
keys for our purposes, and these are often used for tags and so on.
But Strings that are the key of an object/pair are much less useful to
index, in my estimation.

--
Regards,
Peter Geoghegan


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: working around JSONB's lack of stats?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: working around JSONB's lack of stats?