Re: Best way to parse complex json string into table columns?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sbob <sbob(at)quadratum-braccas(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Best way to parse complex json string into table columns?
Date: 2023-12-13 17:24:56
Message-ID: 2620242.1702488296@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Sbob <sbob(at)quadratum-braccas(dot)com> writes:
> I have a client that is using a function to parse a set of rows from a
> table with a json column into table columns in a materialized view.
> ...
> The above approach is painfully slow, is there a better performing
> method of converting json strings to table columns?

json[b]_populate_record is meant for this sort of thing.

Also, if your source data is actually json not jsonb, that's
a seriously poor choice when you are in need of better
processing speed.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message SOzcn 2023-12-13 17:27:55 Re: Reindex concurrently
Previous Message Sbob 2023-12-13 16:55:15 Best way to parse complex json string into table columns?