Re: COPY vs INSERT

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, David Roussel <pgsql-performance(at)diroussel(dot)xsmail(dot)com>, Mischa Sandberg <mischa(dot)sandberg(at)telus(dot)net>, pgsql-perform <pgsql-performance(at)postgresql(dot)org>
Subject: Re: COPY vs INSERT
Date: 2005-05-06 12:38:31
Message-ID: 20050506123831.GA14417@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, May 06, 2005 at 01:51:29 -0500,
"Jim C. Nasby" <decibel(at)decibel(dot)org> wrote:
> On Wed, May 04, 2005 at 10:22:56PM -0400, Tom Lane wrote:
> > Also, there is a whole lot of one-time-per-statement overhead that can
> > be amortized across many rows instead of only one. Stuff like opening
> > the target table, looking up the per-column I/O conversion functions,
> > identifying trigger functions if any, yadda yadda. It's not *that*
> > expensive, but compared to an operation as small as inserting a single
> > row, it's significant.
>
> Has thought been given to supporting inserting multiple rows in a single
> insert? DB2 supported:
>
> INSERT INTO table VALUES(
> (1,2,3),
> (4,5,6),
> (7,8,9)
> );
>
> I'm not sure how standard that is or if other databases support it.

It's on the TODO list. I don't remember anyone bringing this up for about
a year now, so I doubt anyone is actively working on it.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-05-06 13:51:55 Re: COPY vs INSERT
Previous Message Jona 2005-05-06 11:14:51 Re: Bad choice of query plan from PG 7.3.6 to PG 7.3.9