Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id C00462E0073 for ; Wed, 4 Jun 2008 07:31:38 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 88663-01 for ; Wed, 4 Jun 2008 07:31:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ppsw-6.csi.cam.ac.uk (ppsw-6.csi.cam.ac.uk [131.111.8.136]) by developer.postgresql.org (Postfix) with ESMTP id 8D5F22E0072 for ; Wed, 4 Jun 2008 07:31:29 -0300 (ADT) X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from flymine.sysbiol.cam.ac.uk ([131.111.60.120]:40659 helo=flymine.flymine.org) by ppsw-6.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.136]:25) with esmtp id 1K3qH5-0002ES-Jt (Exim 4.67) (return-path ); Wed, 04 Jun 2008 11:31:23 +0100 Received: from host103 ([192.168.128.103] helo=aragorn.flymine.org ident=Debian-exim) by flymine.flymine.org with esmtp (Exim 4.12) id 1K3qH5-0005Dk-00; Wed, 04 Jun 2008 11:31:23 +0100 Received: from mnw21 (helo=localhost) by aragorn.flymine.org with local-esmtp (Exim 4.69) (envelope-from ) id 1K3qH4-000404-TJ; Wed, 04 Jun 2008 11:31:22 +0100 Date: Wed, 4 Jun 2008 11:31:22 +0100 (BST) From: Matthew Wakeling X-X-Sender: mnw21@aragorn.flymine.org To: andrew klassen cc: pgsql-performance@postgresql.org Subject: Re: insert/update tps slow with indices on table > 1M rows In-Reply-To: <691681.3510.qm@web37304.mail.mud.yahoo.com> Message-ID: References: <691681.3510.qm@web37304.mail.mud.yahoo.com> MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 200806/17 X-Sequence-Number: 30367 On Tue, 3 Jun 2008, andrew klassen wrote: > Basically, I have a somewhat constant rate of inserts/updates that go=20 > into a work queue and then get passed to postgres. > The cpu load is not that high, i.e. plenty of idle cpu. I am running an o= lder > version of freebsd=A0and the iostat output is not very detailed. If you're running a "work queue" architecture, that probably means you=20 only have one thread doing all the updates/inserts? It might be worth=20 going multi-threaded, and issuing inserts and updates through more than=20 one connection. Postgres is designed pretty well to scale performance by=20 the number of simultaneous connections. Matthew --=20 Contrary to popular belief, Unix is user friendly. It just happens to be very selective about who its friends are. -- Kyle Hearn=