Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id CE6BE9FB2DA for ; Tue, 13 Mar 2007 07:55:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 94839-04 for ; Tue, 13 Mar 2007 07:55:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by postgresql.org (Postfix) with ESMTP id C37769FB2BD for ; Tue, 13 Mar 2007 07:55:13 -0300 (ADT) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HR4eu-0002sc-T4 for pgsql-performance@postgresql.org; Tue, 13 Mar 2007 03:55:12 -0700 Message-ID: <9452092.post@talk.nabble.com> Date: Tue, 13 Mar 2007 03:55:12 -0700 (PDT) From: femski To: pgsql-performance@postgresql.org Subject: Postgres batch write very slow - what to do MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: hypertree@yahoo.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.456 tagged_above=0 required=5 tests=AWL, BAYES_00, FORGED_YAHOO_RCVD, SPF_HELO_PASS, SPF_PASS X-Spam-Level: * X-Archive-Number: 200703/211 X-Sequence-Number: 23616 Folks ! I have a batch application that writes approx. 4 million rows into a narrow table. I am using JDBC addBatch/ExecuteBatch with auto commit turned off. Batch size is 100. So far I am seeing Postgres take roughly five times the time it takes to do this in the Oracle. I have played with many parameters. Only one that seems to have any affect is fsync - but thats only 10% or so. Initially I got the warning that checkpoints were happening too often so I increased the segments to 24. Warnings stopped, but no real improvement in performance. Is postgres really that slow ? What am I missing ? Here are the changes to my postgressql.cong file. shared_buffers = 768MB work_mem = 256MB maintenance_work_mem = 128MB fsync = off checkpoint_segments = 24 autovacuum = on Thank you, -Sanjay -- View this message in context: http://www.nabble.com/Postgres-batch-write-very-slow---what-to-do-tf3395195.html#a9452092 Sent from the PostgreSQL - performance mailing list archive at Nabble.com.