Re: Performance on JSONB select

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Performance on JSONB select
Дата
Msg-id CAHOFxGrqwJYg=iuyjqt9Tf6twb1h3aA13+c0sOWY1SESbT9gXw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Performance on JSONB select  (PegoraroF10 <marcos@f10.com.br>)
Ответы Re: Performance on JSONB select  (PegoraroF10 <marcos@f10.com.br>)
Список pgsql-general
My Json has always a status

Why declare the "where" clause when creating the index? It would not seem needed if status is always set and so your index will reference all rows in the table.

Thanks for sharing the trick of having the second column in the index determine the key based on the first column. I don't know if/when I might need this, but an interesting solution. Generically, it seems like the below-

create index idx_mytable_jsonb_dependent_fields on public.mytable ( (JsonBField->>'primary_field_to_filter_on'), JsonBField->(JsonBField->>'primary_field_to_filter_on')->>'secondary_field' );

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Table locking during backup
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: JSONB maximal length ?