Re: querying jsonb for arrays inside a hash

Поиск
Список
Период
Сортировка
От Joe Van Dyk
Тема Re: querying jsonb for arrays inside a hash
Дата
Msg-id CACfv+pLH3Z7ox-H9o01x805H03OpyGoOczVti2PuDtTYfrwPTQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: querying jsonb for arrays inside a hash  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
You're right, brain fart. Nevermind! :)

On Sat, Nov 7, 2015 at 4:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: querying jsonb for arrays inside a hash
Следующее
От: David Osborne
Дата:
Сообщение: Slow 3 Table Join with v bad row estimate