pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Florian Weimer <fweimer@bfk.de>
To: guoping.zhang@nec.com.au
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance?
Date: Wed, 19 Jul 2006 09:38:10 +0200
Message-ID: <828xmq2gf1.fsf@mid.bfk.de> (raw)
In-Reply-To: <003501c6ab05$a4978f20$74304c93@eddy>
References: <003501c6ab05$a4978f20$74304c93@eddy>

* 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



view thread (11+ messages)  latest in thread

Message-ID: <828xmq2gf1.fsf@mid.bfk.de>
Permalink:  ../828xmq2gf1.fsf@mid.bfk.de/
Also on:    postgresql.org/message-id/828xmq2gf1.fsf@mid.bfk.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: fweimer@bfk.de, guoping.zhang@nec.com.au
  Subject: Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance?
  In-Reply-To: <828xmq2gf1.fsf@mid.bfk.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox