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:34:41 |
Message-ID: | CAEYLb_VvYFj4WO4nmHHiz_JP_0qoaJ0mCejLews3oNajDr6vkg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Wed, Jan 28, 2015 at 3:03 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> We already have most_common_elem (MCE) for arrays and tsearch. What if
> we put JSONB's most common top-level keys (or array elements, depending)
> in the MCE array? Then we could still apply a simple rule for any path
> criteria below the top-level keys, say assuming that any sub-key
> criteria would match 10% of the time. While it wouldn't be perfect, it
> would be better than what we have now.
Well, the "top-level keys" would still be gathered for expression
indexes. So yeah, maybe it would work alright for arrays of "tags",
and things like that. I tend to think that that's a common enough
use-case.
--
Regards,
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2015-01-28 23:42:11 | Re: working around JSONB's lack of stats? |
Previous Message | Josh Berkus | 2015-01-28 23:03:06 | Re: working around JSONB's lack of stats? |