Re: jsonb and nested hstore

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: jsonb and nested hstore
Дата
Msg-id 5320C593.6070407@dunslane.net
обсуждение исходный текст
Ответ на Re: jsonb and nested hstore  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: jsonb and nested hstore  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On 03/12/2014 04:10 PM, Peter Geoghegan wrote:
> On Wed, Mar 12, 2014 at 11:57 AM, Oleg Bartunov <obartunov@gmail.com> wrote:
>> Also, GiST index is faster for create/update operations. I really hope we will
>> improve jsonb indexing in the next one-two releases. For now I'd suggest people
>> index expressional indexes to index just interesting keys or use GiST.
> When do you ever want to index non-interesting keys?
>


The problem is when do you know they are interesting?

One major use case for using treeish data types in the first place is 
that you don't know when you're designing the database exactly what 
shape the data will be. If you don't know that, then how are you 
supposed to know what in it will be interesting? It's somewhat analogous 
to full text indexing, where we don't know in advance what phrases or 
words will be interesting. Here, a key is the equivalent of a word and a 
key path or subpath is the equivalent of a phrase.

Maybe I'm dreaming, since I have no idea how to go about this sort of 
indexing, but it's where I'd like to see lots of effort.

I agree with Oleg that we need to be very creative about jsonb indexing. 
One of my hopes is that by going down the road we are on, we'll get much 
wider interest in this, and that both ideas and money might flow towards 
addressing it in a way that we probably wouldn't have seen otherwise.

cheers

andrew



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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: jsonb and nested hstore
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Replication slots and footguns