Re: working around JSONB's lack of stats?

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

 



On Wed, Jan 28, 2015 at 3:42 PM, Josh Berkus <josh@xxxxxxxxxxxx> wrote:
> jsonb_col @> '[ "key1" ]'
> or jsonb_col ? 'key1'
>         if in MCE, assign % from MCE
>         otherwise assign 1% of non-MCE %
>
> jsonb_col @> '{ "key1": "value1" }'
>         if in MCE, assign MCE% * 0.1
>         otherwise assign 0.01 of non-MCE %
>
> Does that make sense?

I suspect it makes a lot less sense. The way people seem to want to
use jsonb is as a document store with a bit of flexibility. Individual
JSON documents tend to be fairly homogeneous in structure within a
table, just like with systems like MongoDB. Strings within arrays are
keys for our purposes, and these are often used for tags and so on.
But Strings that are the key of an object/pair are much less useful to
index, in my estimation.

-- 
Regards,
Peter Geoghegan


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




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

  Powered by Linux