Hello
2011/6/27 chester c young
> forgive me for brain storming a little re copy:
>
> if there are a limited number of tables you're inserting, would there be
> anything wrong with the app opening a copy connection? ie, a connection
> initiates the copy and then stays open like a pipe for any i
forgive me for brain storming a little re copy:
if there are a limited number of tables you're inserting, would there be
anything wrong with the app opening a copy connection? ie, a connection
initiates the copy and then stays open like a pipe for any inserts coming
through it. visually it's a
On 27/06/11 15:05, Pavel Stehule wrote:
> exec('begin');
> for(i = 0; i < 1000; i++)
> exec("insert into foo values($1), itoa(i));
> exec('commit');
You can probably also benefit from multi-valued INSERTs, though I
haven't verified this.
INSERT INTO foo VALUES
(1,'joe','dean'),
(4,'fred','bob'
very nice pointers. thank you very much!
--- On Mon, 6/27/11, Pavel Stehule wrote:
From: Pavel Stehule
Subject: Re: [SQL] best performance for simple dml
To: "chester c young"
Cc: pgsql-sql@postgresql.org
Date: Monday, June 27, 2011, 1:05 AM
2011/6/27 chester c young
>
> two questions:
> I
2011/6/27 chester c young
>
> two questions:
> I thought copy was for multiple rows - is its setup cost effective for one
> row?
I expect it will be faster for one row too - it is not sql statement
if you want to understand to performance issues you have to understand to
a) network communicati