Re: querying jsonb for arrays inside a hash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: querying jsonb for arrays inside a hash
Дата
Msg-id 25341.1446940821@sss.pgh.pa.us
обсуждение исходный текст
Ответ на querying jsonb for arrays inside a hash  (Joe Van Dyk <joe@tanga.com>)
Ответы Re: querying jsonb for arrays inside a hash  (Joe Van Dyk <joe@tanga.com>)
Список pgsql-performance
Joe Van Dyk <joe@tanga.com> writes:
> I noticed that querying for
>    product_attributes @> '{"upsell":["true"]}'
> is much slower than querying for
>    product_attributes @> '{"upsell": 1}'

> Is that expected?

Your EXPLAIN results say that the first query matched 135843 rows and the
second one none at all, so a significant variation in runtime doesn't seem
that surprising to me ...

            regards, tom lane


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

Предыдущее
От: Joe Van Dyk
Дата:
Сообщение: querying jsonb for arrays inside a hash
Следующее
От: Joe Van Dyk
Дата:
Сообщение: Re: querying jsonb for arrays inside a hash