X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BAD23D86C6 for ; Tue, 30 Aug 2005 19:15:37 -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 84803-01 for ; Tue, 30 Aug 2005 22:15:25 +0000 (GMT) Received: from mail.envyfinancial.com (unknown [206.248.142.186]) by svr1.postgresql.org (Postfix) with ESMTP id D5082D86C4 for ; Tue, 30 Aug 2005 19:15:20 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.envyfinancial.com (Postfix) with ESMTP id 94AE81C73D; Tue, 30 Aug 2005 18:05:03 -0400 (EDT) Received: from mail.envyfinancial.com ([127.0.0.1]) by localhost (mark.mielke.cc [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27349-07; Tue, 30 Aug 2005 18:05:03 -0400 (EDT) Received: by mail.envyfinancial.com (Postfix, from userid 500) id 6A5931C742; Tue, 30 Aug 2005 18:05:03 -0400 (EDT) Date: Tue, 30 Aug 2005 18:05:03 -0400 From: mark@mark.mielke.cc To: Tom Lane Cc: markus@m-bass.com, pgsql-performance@postgresql.org Subject: Re: When to do a vacuum for highly active table Message-ID: <20050830220503.GA27740@mark.mielke.cc> References: <20050830211356.48138.qmail@web31606.mail.mud.yahoo.com> <24875.1125437357@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24875.1125437357@sss.pgh.pa.us> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: amavisd-new at mail.envyfinancial.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.208 required=5 tests=[AWL=0.030, NO_REAL_NAME=0.178] X-Spam-Level: X-Archive-Number: 200508/543 X-Sequence-Number: 14290 On Tue, Aug 30, 2005 at 05:29:17PM -0400, Tom Lane wrote: > Markus Benne writes: > > We have a highly active table that has virtually all > > entries updated every 5 minutes. Typical size of the > > table is 50,000 entries, and entries have grown fat. > ... > > We are thinking of splitting the table in two: the > > part the updates often, and the part the updates > > infrequently as we suspect that record size impacts > > vacuum. > You just said that virtually all rows update constantly --- where's > the "infrequent" part? I think he means splitting it vertically, instead of horizontally, and it sounds like an excellent idea, if a large enough portion of each record is in fact mostly fixed. Otherwise, PostgreSQL is copying data multiple times, only to have the data expire as part of a dead row. I've already started to notice such issues with postgresql - but more because I'm using low-end hardware, and I'm projecting the effect for when our database becomes much larger with much higher demand on the database. This is the sort of scenario where a database without transactional integrity would significantly out-perform one designed around it. If records are fixed sized, and updated in place, these problems would occur far less often. Is it heresy to suggest MySQL in here? :-) I switched from MySQL to PostgreSQL several months ago, and haven't looked back - but they do work differently, and for certain uses, one can destroy the other. Using a MyISAM table would be the way I would go with this sort of problem. Cheers, mark -- mark@mielke.cc / markm@ncf.ca / markm@nortel.com __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them... http://mark.mielke.cc/