X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0528B11F6671 for ; Thu, 13 Apr 2006 01:42:38 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.125 X-Spam-Level: X-Spam-Status: No, score=0.125 required=5 tests=[AWL=0.125] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id PY0qaUSM3Gc7 for ; Thu, 13 Apr 2006 01:42:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D789611F6691 for ; Thu, 13 Apr 2006 01:42:26 -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 k3D4gOJT009550; Thu, 13 Apr 2006 00:42:24 -0400 (EDT) To: Chris cc: Francisco Reyes , Pgsql performance Subject: Re: Inserts optimization? In-reply-to: <443DA715.4060606@gmail.com> References: <443DA715.4060606@gmail.com> Comments: In-reply-to Chris message dated "Thu, 13 Apr 2006 11:19:17 +1000" Date: Thu, 13 Apr 2006 00:42:24 -0400 Message-ID: <9549.1144903344@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/289 X-Sequence-Number: 18373 Chris writes: > Francisco Reyes wrote: >> Doing my first write heavy database. >> What settings will help improve inserts? >> Only a handfull of connections, but each doing up to 30 inserts/second. > If you can, use copy instead: > http://www.postgresql.org/docs/8.1/interactive/sql-copy.html Or at least try to do multiple inserts per transaction. Also, increasing checkpoint_segments and possibly wal_buffers helps a lot for write-intensive loads. Try to get the WAL onto a separate disk spindle if you can. (These things don't matter for SELECTs, but they do matter for writes.) regards, tom lane