From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Computed index on transformation of jsonb key set
Date: Fri, 26 Apr 2019 15:58:18 -0600
Message-ID: <3f0002f7-5967-10d7-e076-c33448149596@gmail.com> (raw)
In-Reply-To: <0E4CECBC-F22A-4EE2-9E71-5ABA9EB89DFC@gmail.com>
References: <8A0F49D1-CA16-445B-BC4E-F53E9925809C@gmail.com>
<996b3096-a521-521e-5d10-0978de5f5052@gmail.com>
<0E4CECBC-F22A-4EE2-9E71-5ABA9EB89DFC@gmail.com>
On 4/26/19 3:53 PM, Steven Schlansker wrote:
>
>> On Apr 26, 2019, at 2:33 PM, Rob Sargent <robjsargent@gmail.com> wrote:
>>
>>
>> On 4/26/19 3:25 PM, Steven Schlansker wrote:
>>>
>>> How can I efficiently implement the feature I've described? It seems difficult to use computed indexing with GIN.
>>>
>> Storing the map in a child table (parentId, UUID, int) is out of the question?
> Yes, thanks Rob and David, that will be my approach if I can't figure out anything better.
>
> I was hoping to not have to denormalize the data given that Postgres generally has great support for computing indexes,
> both to avoid storage costs and eliminate the need to maintain triggers or application code to handle it.
>
>
>
Is that json structure really more compact than the matching table (even
with the additional parent id)?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com
Subject: Re: Computed index on transformation of jsonb key set
In-Reply-To: <3f0002f7-5967-10d7-e076-c33448149596@gmail.com>
References: <8A0F49D1-CA16-445B-BC4E-F53E9925809C@gmail.com> <996b3096-a521-521e-5d10-0978de5f5052@gmail.com> <0E4CECBC-F22A-4EE2-9E71-5ABA9EB89DFC@gmail.com> <3f0002f7-5967-10d7-e076-c33448149596@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox