Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hK8mf-0004t2-M8 for pgsql-general@arkaria.postgresql.org; Fri, 26 Apr 2019 21:53:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hK8md-0007x4-NB for pgsql-general@arkaria.postgresql.org; Fri, 26 Apr 2019 21:53:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hK8md-0007n9-98 for pgsql-general@lists.postgresql.org; Fri, 26 Apr 2019 21:53:27 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hK8mW-00035S-AR for pgsql-general@lists.postgresql.org; Fri, 26 Apr 2019 21:53:26 +0000 Received: by mail-pf1-x443.google.com with SMTP id j11so2310490pff.13 for ; Fri, 26 Apr 2019 14:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=NMHq9+dRPGFFbqqJ/qzr+ALZ1yh0AuvLs4LLBVyDPOo=; b=B2eBJ2OHRC+c6VocAVD6gTv8f95FUYEmsHl9GSlFffvK5fc7A52nYRLoqyDZpXh3bC bhRqGplEq58u2ub6A3c0OcOWf/Q7XseGmCdWPCasvyeYb/Q2LojB7a9/nnbT/1ib06Xc yc0Pibm08exToRxMNfwRbCu4NPRF4eODzawVwQA+Tba4PyUsj+c3UXEeRSpqk21lcfnZ 5yzw8JWZ8ntjywTQklU0/innsn0FcCu5vyPf5g5D+4d+qM7BRu9sYOE/niP5++lRcJI2 iLDVz241Nc8nFgfSpXdTajmGhQO5rIAFSeJY1xiJcToBTHRlCmpDUsCh6/U3769K0ZCh xJeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=NMHq9+dRPGFFbqqJ/qzr+ALZ1yh0AuvLs4LLBVyDPOo=; b=B/5HbSaTrA0ruGWein7+jKi5+8Z3gQiWTrX8OLsyLyvAvFfbPoV+6zDhpBAcljJU84 jSV0LtnWDJByYuBszTauggfnN6kzxoJSF5D9lrorGzMU4ZnJQXgJ/nleq0RI2ycfAb2H +L2GLTKxfTc3O9urUirHqdIzC4AIlUL/J9/O77JZPtWnOYKbJezzSsUbA8hzEcCM17GP nq3ogTK/ATlB2jxFQ3UHWKrt3Zq4f329tH2YGT6VOfMRJAYqUF1pg17B8GM9mIBW6GnP nBtBa/F6osjOv8od3MmQ8c+57NZHLxmo6EdoxG5iz/L7orgb0G1t5ihoBfqhvsMMywxp ZAhg== X-Gm-Message-State: APjAAAXL4fkau+UxHTupenyHpQD2oFNlVeeW+yYVQ9fA9qUSql+PL9PG ZLthnAdXELq9M77JmTyRBOaishDaNUg= X-Google-Smtp-Source: APXvYqyJM+De7zBg2mB2VL99odTeYwv6lB4eynvUn6atrkhoUGRwdHc1mA+e/cs1d4FdWBuj9t+nug== X-Received: by 2002:aa7:810e:: with SMTP id b14mr5650882pfi.112.1556315597591; Fri, 26 Apr 2019 14:53:17 -0700 (PDT) Received: from [10.7.108.6] ([65.200.105.250]) by smtp.gmail.com with ESMTPSA id a129sm41281571pfa.152.2019.04.26.14.53.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 14:53:16 -0700 (PDT) From: Steven Schlansker Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: Computed index on transformation of jsonb key set Date: Fri, 26 Apr 2019 14:53:15 -0700 References: <8A0F49D1-CA16-445B-BC4E-F53E9925809C@gmail.com> <996b3096-a521-521e-5d10-0978de5f5052@gmail.com> To: pgsql-general@lists.postgresql.org In-Reply-To: <996b3096-a521-521e-5d10-0978de5f5052@gmail.com> Message-Id: <0E4CECBC-F22A-4EE2-9E71-5ABA9EB89DFC@gmail.com> X-Mailer: Apple Mail (2.3445.102.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Apr 26, 2019, at 2:33 PM, Rob Sargent = wrote: >=20 >=20 > On 4/26/19 3:25 PM, Steven Schlansker wrote: >>=20 >>=20 >> How can I efficiently implement the feature I've described? It seems = difficult to use computed indexing with GIN. >>=20 > 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.