X-Original-To: pgsql-sql@postgresql.org Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 98D3147F48D for ; Wed, 5 Mar 2003 03:38:07 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Wed Mar 05 09:38:07 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id JAA19288; Wed, 5 Mar 2003 09:38:06 +0100 (MET) Message-ID: <3E65B76E.D6E118D7@rodos.fzk.de> Date: Wed, 05 Mar 2003 09:38:06 +0100 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: gary.stainburn@ringways.co.uk Subject: Re: Insert multiple Rows Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/143 X-Sequence-Number: 12183 > > If you use a 'prepared' insert within a transaction, would that speed things > up - maybe by defering index updates? > I doubt it. From: Neil Conway ... I'd suspect that for most INSERT queries, the parsing/rewriting/planning stages are relatively inexpensive, and the bulk of the runtime is spent in the executor (and writing WAL records, etc). So my guess would be that you won't see that much of a performance improvement from this... I've noticed a real performance boost using COPY something like ... PQexec("COPY xxx FROM stdin"); for (...) { sprintf(buf, "%d\t%d\t...\n", values[0], values[1], ... values[n]); PQputline(conn, buf); } PQputline(conn, "\\.\n"); PQendcopy(conn); runs like hell. Regards, Christoph