X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id F0723D1B89F for ; Mon, 18 Aug 2003 15:53:20 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 23319-09 for ; Mon, 18 Aug 2003 12:53:10 -0300 (ADT) Received: from fuji.krosing.net (unknown [194.204.44.104]) by svr1.postgresql.org (Postfix) with ESMTP id 215B6D1B897 for ; Mon, 18 Aug 2003 12:53:09 -0300 (ADT) Received: from fuji.krosing.net (localhost.localdomain [127.0.0.1]) by fuji.krosing.net (8.12.8/8.12.8) with ESMTP id h7IFqosQ002646; Mon, 18 Aug 2003 18:52:50 +0300 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id h7IFqhGX002643; Mon, 18 Aug 2003 18:52:43 +0300 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: Insert performance From: Hannu Krosing To: shridhar_daithankar@persistent.co.in Cc: pgsql-performance@postgresql.org In-Reply-To: <3F40BDC4.1605.9407ADF@localhost> References: <3F3E3B47.13828.333B51D9@localhost> <3F40BDC4.1605.9407ADF@localhost> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1061221963.2620.4.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Mon, 18 Aug 2003 18:52:43 +0300 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/287 X-Sequence-Number: 3103 Shridhar Daithankar kirjutas E, 18.08.2003 kell 09:21: > On 16 Aug 2003 at 11:40, Josh Berkus wrote: > > > Shridhar, > > > > > Unfortunately he can not use copy due to some constraints. > > > > Why not use COPY to load the table, and then apply the constraints by query > > afterwords? It might not be faster, but then again it might. > > Lol.. The constraints I mentioned weren't database constraints.. Can't you still apply them later ;) My own experimentation also got numbers in 9k/sec range (on a quad 1.3GHz Xeons, 2GM mem, 50MB/sec raid) when doing 10-20 parallel runs of ~1000 inserts/transaction. Performance dropped to ~300/sec (at about 60M rows) when I added an index (primary key) - as I did random inserts, the hit rates for index pages were probably low. -------------- Hannu