Re: Emitting JSON to file using COPY TO - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Emitting JSON to file using COPY TO
Date
Msg-id 1110690.1701880139@sss.pgh.pa.us
Whole thread Raw
In response to Re: Emitting JSON to file using COPY TO  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Emitting JSON to file using COPY TO
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 2023-12-06 We 10:44, Tom Lane wrote:
>> In particular, has anyone done any performance testing?
>> I'm concerned about that because composite_to_json() has
>> zero capability to cache any metadata across calls, meaning
>> there is going to be a large amount of duplicated work
>> per row.

> Yeah, that's hard to deal with, too, as it can be called recursively.

Right.  On the plus side, if we did improve this it would presumably
also benefit other callers of composite_to_json[b].

> OTOH I'd rather have a version of this that worked slowly than none at all.

It might be acceptable to plan on improving the performance later,
depending on just how bad it is now.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: Clean up some signal usage mainly related to Windows
Next
From: Nathan Bossart
Date:
Subject: Re: Emitting JSON to file using COPY TO