pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
More efficient access of JSON array elements?
2+ messages / 2 participants
[nested] [flat]

* More efficient access of JSON array elements?
@ 2020-07-19 01:22  Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Wells Oliver @ 2020-07-19 01:22 UTC (permalink / raw)
  To: pgsql-admin

Hi: I'm wondering if there's an application of GIN (or otherwise) indexing
with jsonb columns to help speed up some queries where I'm not using WHERE
clauses, but unpacking rather large json objects to rows via
jsonb_array_elements: it seems indexing largely helps when filtering, but
this is more unpacking/flattening with really quite sizable objects.

PG 12.3.

-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: More efficient access of JSON array elements?
@ 2020-07-22 18:42  Bruce Momjian <bruce@momjian.us>
  parent: Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2020-07-22 18:42 UTC (permalink / raw)
  To: Wells Oliver <wells.oliver@gmail.com>; +Cc: pgsql-admin

On Sat, Jul 18, 2020 at 06:22:20PM -0700, Wells Oliver wrote:
> Hi: I'm wondering if there's an application of GIN (or otherwise) indexing with
> jsonb columns to help speed up some queries where I'm not using WHERE clauses,
> but unpacking rather large json objects to rows via jsonb_array_elements: it
> seems indexing largely helps when filtering, but this is more unpacking/
> flattening with really quite sizable objects.

You can use JSON (not JSONB) to get faster loading/unloading, but much
slower filtering.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-07-22 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 01:22 More efficient access of JSON array elements? Wells Oliver <wells.oliver@gmail.com>
2020-07-22 18:42 ` Bruce Momjian <bruce@momjian.us>

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