Re: COPY FROM WHEN condition - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: COPY FROM WHEN condition
Date
Msg-id fb7c3fa9-207d-800e-77a8-fe19af4f3729@2ndquadrant.com
Whole thread Raw
In response to Re: COPY FROM WHEN condition  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: COPY FROM WHEN condition  (Andres Freund <andres@anarazel.de>)
Re: COPY FROM WHEN condition  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
On 1/29/19 8:18 AM, David Rowley wrote:
> ...
> Here are my performance tests of with and without your change to the
> memory contexts (I missed where you posted your results).
> 
> $ cat bench.pl
> for (my $i=0; $i < 8912891; $i++) {
> print "1\n1\n2\n2\n";
> }
> 36a1281f86c: (with your change)
> 
> postgres=# copy listp from program $$perl ~/bench.pl$$ delimiter '|';
> COPY 35651564
> Time: 26825.142 ms (00:26.825)
> Time: 27202.117 ms (00:27.202)
> Time: 26266.705 ms (00:26.267)
> 
> 4be058fe9ec: (before your change)
> 
> postgres=# copy listp from program $$perl ~/bench.pl$$ delimiter '|';
> COPY 35651564
> Time: 25645.460 ms (00:25.645)
> Time: 25698.193 ms (00:25.698)
> Time: 25737.251 ms (00:25.737)
> 

How do I reproduce this? I don't see this test in the thread you linked,
so I'm not sure how many partitions you were using, what's the structure
of the table etc.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: pgsql: Build src/port files as a library with -fPIC, and usethat in li
Next
From: John Naylor
Date:
Subject: Re: WIP: Avoid creation of the free space map for small tables