X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AB12B52A00 for ; Wed, 13 Jul 2005 19:51:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81225-09 for ; Wed, 13 Jul 2005 22:51:26 +0000 (GMT) Received: from cmailm4.svr.pol.co.uk (cmailm4.svr.pol.co.uk [195.92.193.211]) by svr1.postgresql.org (Postfix) with ESMTP id A1D0D52800 for ; Wed, 13 Jul 2005 19:51:26 -0300 (ADT) Received: from modem-430.llama.dialup.pol.co.uk ([217.135.177.174] helo=192.168.0.102) by cmailm4.svr.pol.co.uk with esmtp (Exim 4.41) id 1Dsq4a-0005eR-Bg; Wed, 13 Jul 2005 23:51:24 +0100 Subject: Re: Quad Opteron stuck in the mud From: Simon Riggs To: Dan Harris Cc: pgsql-performance@postgresql.org In-Reply-To: References: Content-Type: text/plain Organization: 2nd Quadrant Date: Wed, 13 Jul 2005 23:51:16 +0100 Message-Id: <1121295076.3970.381.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.052 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200507/156 X-Sequence-Number: 13397 On Wed, 2005-07-13 at 12:54 -0600, Dan Harris wrote: > For example, as I'm writing this, I am running an UPDATE statement > that will affect a small part of the table, and is querying on an > indexed boolean field. An indexed boolean field? Hopefully, ftindex is false for very few rows of the table? Try changing the ftindex to be a partial index, so only index the false values. Or don't index it at all. Split the table up into smaller pieces. Don't use an UPDATE statement. Keep a second table, and insert records into it when you would have updated previously. If a row is not found, you know that it has ftindex=true. That way, you'll never have row versions building up in the main table, which you'll still get even if you VACUUM. Best Regards, Simon Riggs