Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E55329FBE0E for ; Fri, 16 Mar 2007 09:48:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 83341-03 for ; Fri, 16 Mar 2007 09:48:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by postgresql.org (Postfix) with ESMTP id A22BC9FBD20 for ; Fri, 16 Mar 2007 09:48:24 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id x4so239229nfb for ; Fri, 16 Mar 2007 05:48:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UsKizMxvi0G2EHgTilj58JfhfMueeA1Ar0ggHrtIMUIwav2mFCEB6OSykMMVZoevi2wqbjQYPDrV30SRhV9dNcykInOa/ix/VWKlkUJHtmNbmPJqeSGMulOYXhChbJqsdpk3jx34jLYpFl4qSmSjxoWG/vC1OO3MTWu4rRMa+Uw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eBhTRAZqeQZa2rStNfnP3bS9Q/1dEn8q+pqlvYRSYBYTaWQxy9/s21YGAcNpE98v0aj/9z3oGDkFHssZHvQ6vX8hH7yv+0kCBPCRz7JKGSstobwUpY6U8+n6pZy+ppA7yvz9xvZ49oZTO3B/U68+DQ4RMrlH3mkntb6CeftHlaU= Received: by 10.78.203.13 with SMTP id a13mr954918hug.1174049302666; Fri, 16 Mar 2007 05:48:22 -0700 (PDT) Received: by 10.78.35.18 with HTTP; Fri, 16 Mar 2007 05:48:22 -0700 (PDT) Message-ID: Date: Fri, 16 Mar 2007 07:48:22 -0500 From: "Merlin Moncure" To: femski Subject: Re: Postgres batch write very slow - what to do Cc: pgsql-performance@postgresql.org In-Reply-To: <9492938.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/253 X-Sequence-Number: 23658 On 3/15/07, femski wrote: > > I tried maxpages = 0 and full_page_writes=off and it seemed to be taking > forever. > All other tricks I have already tried. > > At this point I wondering if its a jdbc client side issue - I am using the > latest 8.1. > (as I said in an earlier post - I am using addBatch with batch size of 100). > But just in case - I am missing something. > > If 17k record/sec is right around expected then I must say I am little > disappointed from the "most advanced open source database". Be careful...you are just testing one very specific thing and it its extremely possible that the Oracle JDBC batch insert is more optimized than PostgreSQL's. On my little pentium 4 workstation, by inserting 10 rows per insert: insert values ([...]), ([...]), [8 more rows]; I got a 5x speedup in insert performance using this feature (which is unfortunately new for 8.2). Oracle is most likely pulling similar tricks inside the driver. PostgreSQL is much faster than you think... merlin