Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance? - Mailing list pgsql-performance

From Florian Weimer
Subject Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance?
Date
Msg-id 828xmq2gf1.fsf@mid.bfk.de
Whole thread Raw
In response to Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance?  ("Guoping Zhang" <guoping.zhang@nec.com.au>)
List pgsql-performance
* Guoping Zhang:

> Thanks for pointing me the cause, but we simply cannot use the COPY FROM
> solution.

Why not?  Just do something like this:

CREATE TEMPORARY TABLE tmp (col1 TEXT NOT NULL, col2 INTEGER NOT NULL);
COPY tmp FROM STDIN;
row1    1
row2    2
...
\.
INSERT INTO target SELECT * FROM tmp;

If you need some kind of SELECT/INSERT/UPDATE cycle, it's far more
complex, of course, and I'm not quite happy with what I'm using right
now.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Durlacher Allee 47            tel: +49-721-96201-1
D-76131 Karlsruhe             fax: +49-721-96201-99

pgsql-performance by date:

Previous
From: "Guoping Zhang"
Date:
Subject: Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance?
Next
From: Stephen Frost
Date:
Subject: Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance?