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 1hSsWr-0006hd-G3 for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2019 00:21:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hSsWq-00015q-7j for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2019 00:21:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSsWp-00015j-PR for pgsql-general@lists.postgresql.org; Tue, 21 May 2019 00:21:15 +0000 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSsWn-00006x-CF for pgsql-general@lists.postgresql.org; Tue, 21 May 2019 00:21:14 +0000 Received: by mail-qk1-x732.google.com with SMTP id w25so9965217qkj.11 for ; Mon, 20 May 2019 17:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qyUhXUYTmPRfvqA5l4OYiu/ZBjF2kZaGju5nxcgFz/M=; b=sdGCYTAFPchOZc3rzvC3EIipCGjUHSHMVRVIIJ+9AknDeAMp8ydCRCoallUK/EJfbF M4ALet+CctOx53+2Ss/OQYArsBvXCAkxN6UVxI6b79Ns4LhyFeHA2Xs+K+ftpvpHRaMu Y6qlIfCIY1xww1wdcQLH/3mOxjtfvlRRO1FPXoPRNNul4CzqUgfTVfRnx33ft7sir9xU DOy3DFCSVCobfVbX7RHO7jtdMYuaTpWLA2bWIAEOhmwXeBNTVTkx6dyNQionBBZROp/g dB7GdyAKfXrVSXaNUd4Z8T4RwTYQBTpfPykiuXPN5J+DB3eBLNNzffMe42Ydl2odm3l1 K9AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qyUhXUYTmPRfvqA5l4OYiu/ZBjF2kZaGju5nxcgFz/M=; b=FkBo1XzVTYaAzA24IW0Oo9WZGNzv7yi9ZQLoXgRRaDUJErrmYdew92oFZjSeJGEaFE T0wT2rq1d2TrVC9BF+OLAc/rL36IKy+2Op3sCRmbmDVg8ikDDojRlODw69qjy674nrDV zeJzwmLovUpHP1handLCR92psSEkCVfc/3jV2m+XW9vmuZQRKTOl6mkr4wP2R8741P85 7C0BxigkYo1SUsukS6XpFX2lUSKHsbl7WMDvrc5zXD4OGbwf5dkHQwLgfVWZ2QnNT7O9 UX+jSUBtTGadnYM0u3+1rMnoZKvvmryiGyoKjnU5J3qMepmmaWIr6DHSjQb0DzShIwrr 9NxA== X-Gm-Message-State: APjAAAVOVRxaAizLsWzNGX1g8XbGznChoUJOnEvDgm+tzmGAruoKWQq1 /VoruHq20Tzh2B9473zGXDc= X-Google-Smtp-Source: APXvYqzpMAIDPEoaGCr9gDgWwj2v1gGhpJbq24wA5iojIhEMNG29Z020pe57UXumj9VcTpui0XIRoQ== X-Received: by 2002:a05:620a:12da:: with SMTP id e26mr18662646qkl.132.1558398072522; Mon, 20 May 2019 17:21:12 -0700 (PDT) Received: from [10.35.60.64] ([64.164.57.170]) by smtp.gmail.com with ESMTPSA id c18sm8371727qkl.78.2019.05.20.17.21.11 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 May 2019 17:21:11 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Loading table with indexed jsonb field is stalling From: Will Hartung In-Reply-To: <0a8876b8-f4de-4bc2-72c8-afe5dfe6fde2@gmail.com> Date: Mon, 20 May 2019 17:21:09 -0700 Cc: pgsql-general@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20505.1558202555@sss.pgh.pa.us> <90835D2B-1FBA-4F26-8157-7C831C24B266@gmail.com> <3A35A039-D8F5-4B40-9B41-42E70BEF2C2E@gmail.com> <806d4915-f05d-8e75-0a42-e11b48596ab5@gmail.com> <12E9FEDD-37E9-4D51-9BA7-94FF5039BB1B@gmail.com> <563e995f-d7b1-7e2f-c1f1-b00db7a18589@gmail.com> <3EF519CA-17FE-4B68-8B7A-78200E0A408F@gmail.com> <71e50367-2375-86a8-f795-97c894728998@gmail.com> <3CC10064-7BF0-4600-BC67-8B6F412C9CDC@gmail.com> <0a8876b8-f4de-4bc2-72c8-afe5dfe6fde2@gmail.com> To: Ron X-Mailer: Apple Mail (2.3124) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On May 20, 2019, at 5:15 PM, Ron wrote: >=20 > Are there a sufficiently small number of elements in each traits = object that you can do something like this, on the UNINDEXED table? > SELECT traits->element1, traits->element2, count(*) > from eis_entry > group by traits->element1, traits->element2; >=20 > Sure it would run for a long time, but might show you where the = problem lies. I don=E2=80=99t quite understand what you=E2=80=99re trying to achieve = here. Is the intent essentially to access each individual element within = the json on the select statement? There=E2=80=99s at least 50 elements = in this thing, and the structure is not flat, nor is it static and = consistent. Similar, sure. Perfectly congruent, no.