[pgpool-general: 9230] Re: PGPOOL load

Ilko Krastev ilko.krastev at gmail.com
Mon Oct 21 19:25:53 JST 2024


Hi

COPY table TO 'file';
COPY table FROM 'file';

I make it like this, but  has a problem with load of pool.

On 21.10.24 12:51, Tatsuo Ishii wrote:
>> I have problem with my pgpool it make very big load when run COPY FROM
>> or COPY TO command to import or export file.
>>
>> Can you suggest solution.
> You mean COPY FROM PROGRAM or STDIN, or COPY TO PROGRAM or STDOUT are
> slow? Yes, they are slow because it needs to fly all the data over
> network. For example:
>
> copy pgbench_accounts to program 'cat > /tmp/copy.out';
> will transfer data like this.
> PostgreSQL -> pgpool -> cat -> /tmp/copy.out
>
> On my laptop, the command above took 73.859 ms.
> test=# copy pgbench_accounts to program 'cat > /tmp/copy.out';
> COPY 100000
> Time: 73.859 ms
>
> On the other hand copying to directly local file runs much faster.
>
> test=# copy pgbench_accounts to '/tmp/copy.out';
> COPY 100000
> Time: 49.378 ms
>
> So my advice is, do followings:
>
> COPY table TO 'file';
> or COPY table FROM 'file';
>
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS K.K.
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list