Re: querying jsonb for arrays inside a hash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You're right, brain fart. Nevermind! :)

On Sat, Nov 7, 2015 at 4:00 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Joe Van Dyk <joe@xxxxxxxxx> 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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux