Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E0D9E9FBD83 for ; Thu, 15 Mar 2007 23:15:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 20286-08 for ; Thu, 15 Mar 2007 23:15:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 9E5629FB8C9 for ; Thu, 15 Mar 2007 23:15:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l2G2FdJ7029685; Thu, 15 Mar 2007 22:15:39 -0400 (EDT) To: femski cc: pgsql-performance@postgresql.org Subject: Re: Postgres batch write very slow - what to do In-reply-to: <9492938.post@talk.nabble.com> References: <9452092.post@talk.nabble.com> <45F685B7.5040001@enterprisedb.com> <9453712.post@talk.nabble.com> <9473692.post@talk.nabble.com> <9486986.post@talk.nabble.com> <9492938.post@talk.nabble.com> Comments: In-reply-to femski message dated "Thu, 15 Mar 2007 04:52:53 -0700" Date: Thu, 15 Mar 2007 22:15:39 -0400 Message-ID: <29684.1174011339@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/250 X-Sequence-Number: 23655 femski writes: > If 17k record/sec is right around expected then I must say I am little > disappointed from the "most advanced open source database". Well, the software is certainly capable of much more than that; for instance, on a not-too-new Dell x86_64 machine: regression=# \timing Timing is on. regression=# create table t1(f1 int); CREATE TABLE Time: 3.614 ms regression=# insert into t1 select * from generate_series(1,1000000); INSERT 0 1000000 Time: 3433.483 ms which works out to something a little shy of 300K rows/sec. Of course the main difference from what I think you're trying to do is the lack of any per-row round trips to the client code. But you need to look into where the bottleneck is, not just assume it's insoluble. regards, tom lane