How jsonb updates affect GIN indexes

Поиск
Список
Период
Сортировка
От Eric Mortensen
Тема How jsonb updates affect GIN indexes
Дата
Msg-id CAHRqbZEnmcgridP-B2y6B7vhEvWYB=rnY+mWJdDHjXLRousK4g@mail.gmail.com
обсуждение исходный текст
Ответы Re: How jsonb updates affect GIN indexes  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-general
Hi

When a jsonb column is updated, as far as I understand the entire column is updated, even though perhaps only one of the keys has a modified value. 

My question is: if I have a GIN index on that column, will PG visit every key and update each index entry, or will it visit every key and update each index entry only if the value is different, or will it only visit those keys that have been modified?

I have a jsonb column where I only need to index two keys, and was wondering if there is any benefit in terms of update efficiency to having two indexes, one for each key, rather than just creating a GIN index on the whole (rather large) column. 

Thanks,
Eric

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Possible bug in psql 9.4.4
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: How jsonb updates affect GIN indexes