Re: jsonb and nested hstore

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: jsonb and nested hstore
Дата
Msg-id CAM3SWZRL+cuxvWN+NBc+Us86dc+k5TNp2JZV2RZD+7buyjQ=UA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: jsonb and nested hstore  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: jsonb and nested hstore  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-hackers
On Fri, Mar 14, 2014 at 6:44 PM, Tomas Vondra <tv@fuzzy.cz> wrote:
> Well, depends on how you define useful. With the sample dataset
> 'delicious' (see Peter's post) I can do this:
>
>    SELECT doc FROM delicious
>           WHERE doc @> '{"title_detail" : {"value" : "TheaterMania"}}';
>
> with arbitrary paths, and I may create a GIN index to support such
> queries. And yes, it's much faster than GiST for example (by a factor of
> 1000).

If you know ahead of time the entire nested value you can. So, if you
attach some other data to the "TheaterMania" document, you had better
know that too if you hope to write a query like this. You also have to
index the entire table, where presumably with a little thought you
could get away with a much smaller index. That strikes me as not very
useful.

> Yes, the GIN index is quite large (~560MB for a ~1.2GB table).

With the default opclass, without an expressional index, 100% of the
data from the table appears in the index. Why do you think that's
quite large?

-- 
Peter Geoghegan



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: jsonb and nested hstore
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: gaussian distribution pgbench