Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id C4C0C2E0078 for ; Wed, 4 Jun 2008 12:11:05 -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 44143-04 for ; Wed, 4 Jun 2008 12:10:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ppsw-1.csi.cam.ac.uk (ppsw-1.csi.cam.ac.uk [131.111.8.131]) by developer.postgresql.org (Postfix) with ESMTP id 333C42E007A for ; Wed, 4 Jun 2008 12:10:51 -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]:40910 helo=flymine.flymine.org) by ppsw-1.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.131]:25) with esmtp id 1K3udK-0007Je-5X (Exim 4.67) for pgsql-performance@postgresql.org (return-path ); Wed, 04 Jun 2008 16:10:38 +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 1K3udK-0005yr-00 for pgsql-performance@postgresql.org; Wed, 04 Jun 2008 16:10:38 +0100 Received: from mnw21 (helo=localhost) by aragorn.flymine.org with local-esmtp (Exim 4.69) (envelope-from ) id 1K3udK-0004sU-LI for pgsql-performance@postgresql.org; Wed, 04 Jun 2008 16:10:38 +0100 Date: Wed, 4 Jun 2008 16:10:38 +0100 (BST) From: Matthew Wakeling X-X-Sender: mnw21@aragorn.flymine.org To: pgsql-performance@postgresql.org Subject: Re: insert/update tps slow with indices on table > 1M rows In-Reply-To: <981678.5431.qm@web37304.mail.mud.yahoo.com> Message-ID: References: <981678.5431.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/23 X-Sequence-Number: 30373 On Wed, 4 Jun 2008, andrew klassen wrote: > I am using multiple threads, but only one worker thread for insert/update= d to this table. > I don't mind trying to add multiple threads for this table, but my guess = is it would not > help because basically the overall tps rate is decreasing so dramatically= . Since > the cpu time consumed by the corresponding postgres=A0server process for = my thread is > small it does not seem to be the bottleneck. There has to be a bottleneck= somewhere else. > Do you agree or is there some flaw in my reasoning? There is indeed a flaw in your reasoning - there may be very little CPU=20 time consumed, but that just indicates that the discs are busy. Getting=20 Postgres to do multiple things at once will cause a more efficient use of= =20 the disc subsystem, resulting in greater overall throughput. This is=20 especially the case if you have multiple discs in your box. Matthew --=20 Contrary to popular belief, Unix is user friendly. It just happens to be very selective about who its friends are. -- Kyle Hearn=