X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D5095533AE for ; Fri, 6 May 2005 09:18:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99179-02 for ; Fri, 6 May 2005 12:18:22 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 67081533AB for ; Fri, 6 May 2005 09:18:21 -0300 (ADT) Received: (qmail 17012 invoked by uid 500); 6 May 2005 12:38:31 -0000 Date: Fri, 6 May 2005 07:38:31 -0500 From: Bruno Wolff III To: "Jim C. Nasby" Cc: Tom Lane , Christopher Kings-Lynne , David Roussel , Mischa Sandberg , pgsql-perform Subject: Re: COPY vs INSERT Message-ID: <20050506123831.GA14417@wolff.to> Mail-Followup-To: "Jim C. Nasby" , Tom Lane , Christopher Kings-Lynne , David Roussel , Mischa Sandberg , pgsql-perform References: <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> <20050506065129.GL88920@decibel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050506065129.GL88920@decibel.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/60 X-Sequence-Number: 12224 On Fri, May 06, 2005 at 01:51:29 -0500, "Jim C. Nasby" 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.