Re: Speeding up COPY TO for uuids and arrays

2024-02-26 Thread Ranier Vilela
Em seg., 26 de fev. de 2024 às 02:28, Michael Paquier escreveu: > On Thu, Feb 22, 2024 at 04:42:37PM -0300, Ranier Vilela wrote: > > Can you share exactly script used to create a table? > > Stressing the internals of array_out() for the area of the patch is > not that difficult, as we want to quo

Re: Speeding up COPY TO for uuids and arrays

2024-02-25 Thread Michael Paquier
On Thu, Feb 22, 2024 at 04:42:37PM -0300, Ranier Vilela wrote: > Can you share exactly script used to create a table? Stressing the internals of array_out() for the area of the patch is not that difficult, as we want to quote each element that's returned in output. The trick is to have the follow

re: Speeding up COPY TO for uuids and arrays

2024-02-22 Thread Ranier Vilela
Hi, On 2024-02-17 17:48:23 +0100, Laurenz Albe wrote: > As a test case, I created a table with 1 rows, each of which > had an array of 1 uuids. The table resided in shared buffers. Can you share exactly script used to create a table? best regards, Ranier Vilela

Re: Speeding up COPY TO for uuids and arrays

2024-02-21 Thread Michael Paquier
On Thu, Feb 22, 2024 at 08:16:09AM +0100, Laurenz Albe wrote: > I'm attaching the remaining patch for the Juli commitfest, if you > don't get inspired before that. There are good chances that I get inspired some time next week. We'll see ;) -- Michael signature.asc Description: PGP signature

Re: Speeding up COPY TO for uuids and arrays

2024-02-21 Thread Laurenz Albe
On Thu, 2024-02-22 at 10:34 +0900, Michael Paquier wrote: > This part is done as of 011d60c4352c. I did not evaluate the rest > yet. Thanks! I'm attaching the remaining patch for the Juli commitfest, if you don't get inspired before that. Yours, Laurenz Albe From e8346ea88785a763d2bd3f99800ae92

Re: Speeding up COPY TO for uuids and arrays

2024-02-21 Thread Michael Paquier
On Wed, Feb 21, 2024 at 02:29:05PM +0900, Michael Paquier wrote: > That's very good, so I'd like to apply this part. Let me know if > there are any objections. This part is done as of 011d60c4352c. I did not evaluate the rest yet. -- Michael signature.asc Description: PGP signature

Re: Speeding up COPY TO for uuids and arrays

2024-02-20 Thread Michael Paquier
On Mon, Feb 19, 2024 at 03:08:45PM +0100, Laurenz Albe wrote: > On Sat, 2024-02-17 at 12:24 -0800, Andres Freund wrote: >> I wonder if we should move the core part for converting to hex to numutils.c, >> we already have code the for the inverse. There does seem to be further >> optimization potenti

Re: Speeding up COPY TO for uuids and arrays

2024-02-19 Thread Laurenz Albe
On Sat, 2024-02-17 at 12:24 -0800, Andres Freund wrote: > On 2024-02-17 17:48:23 +0100, Laurenz Albe wrote: > > - Patch 0001 speeds up pq_begintypsend with a custom macro. > > That brought the binary copy down to 3.7 seconds, which is a > > speed gain of 15%. > > Nice win, but I think we can d

Re: Speeding up COPY TO for uuids and arrays

2024-02-18 Thread Michael Paquier
On Sat, Feb 17, 2024 at 12:24:33PM -0800, Andres Freund wrote: > I wonder if we should move the core part for converting to hex to numutils.c, > we already have code the for the inverse. There does seem to be further > optimization potential in the conversion, and that seems better done somewhere >

Re: Speeding up COPY TO for uuids and arrays

2024-02-17 Thread Andres Freund
Hi, On 2024-02-17 17:48:23 +0100, Laurenz Albe wrote: > - Patch 0001 speeds up pq_begintypsend with a custom macro. > That brought the binary copy down to 3.7 seconds, which is a > speed gain of 15%. Nice win, but I think we can do a bit better than this. Certainly it shouldn't be a macro, gi