From: | Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: working around JSONB's lack of stats? |
Date: | 2015-01-28 23:50:35 |
Message-ID: | CAEYLb_VsR0GDpFkuYKCa6srN4yk2K+NkLUi0a5heXtksAd00ag@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Wed, Jan 28, 2015 at 3:42 PM, Josh Berkus <josh(at)agliodbs(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2015-01-28 23:55:25 | Re: working around JSONB's lack of stats? |
Previous Message | Josh Berkus | 2015-01-28 23:42:11 | Re: working around JSONB's lack of stats? |