From: Jim C. Nasby <decibel@decibel.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: David Roussel <pgsql-performance@diroussel.xsmail.com>
Cc: Mischa Sandberg <mischa.sandberg@telus.net>
Cc: pgsql-perform <pgsql-performance@postgresql.org>
Subject: Re: COPY vs INSERT
Date: Fri, 6 May 2005 01:51:29 -0500
Message-ID: <20050506065129.GL88920@decibel.org> (raw)
In-Reply-To: <16747.1115259776@sss.pgh.pa.us>
References: <OF93C70832.2AC188CE-ON85256FF6.0056B587-85256FF6.005774C2@us.ibm.com>
<21154.1115136741@sss.pgh.pa.us>
<1115146397.4277c89dc37b4@webmail.telus.net>
<1115246490.1709.233393619@webmail.messagingengine.com>
<42797C1A.3090303@familyhealth.com.au>
<16747.1115259776@sss.pgh.pa.us>
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.
--
Jim C. Nasby, Database Consultant decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
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: decibel@decibel.org, tgl@sss.pgh.pa.us, chriskl@familyhealth.com.au, pgsql-performance@diroussel.xsmail.com, mischa.sandberg@telus.net
Subject: Re: COPY vs INSERT
In-Reply-To: <20050506065129.GL88920@decibel.org>
* 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