X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9AD17D1B442 for ; Wed, 26 Nov 2003 23:52:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98330-01 for ; Wed, 26 Nov 2003 19:51:52 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 6266CD1B45A for ; Wed, 26 Nov 2003 19:51:42 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hAQNpX19018579; Wed, 26 Nov 2003 18:51:34 -0500 (EST) To: Jeff Boes Cc: pgsql-admin@postgresql.org Subject: Re: Vacuum stats interpreted? In-reply-to: References: <6b79e0aa2a1c3668937e1ce087c4a819@news.teranews.com> <17932.1069883017@sss.pgh.pa.us> Comments: In-reply-to Jeff Boes message dated "Wed, 26 Nov 2003 21:48:26 +0000" Date: Wed, 26 Nov 2003 18:51:33 -0500 Message-ID: <18578.1069890693@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/460 X-Sequence-Number: 11447 Jeff Boes writes: > At some point in time, tgl@sss.pgh.pa.us (Tom Lane) wrote: >> UnUsed is the number of empty line-pointer slots. At 4 bytes apiece, >> this would have to vastly exceed the number of live tuples before you >> should worry much. > For which values of "vastly"? I have a small table (1-2k rows) which has a ratio > of UnUsed:Tuples of 50-500. That sounds like a lot to me too. You should probably VACUUM FULL and then try to increase the frequency of regular vacuums to cut down on the accumulation of deadwood. > The table in question has a ratio of about 10 or 11:1. It did? I saw about 1:1: >> INFO: Pages 3886: Changed 0, Empty 0; Tup 180175: Vac 122, Keep 26437, UnUsed 135721. which is why I didn't feel a need to panic about it. > For some tables (not this one), we find that it significantly improves > performance (of non-indexed queries) to pg_dump and reload the table > periodically. I've been asked to try to quantify (from these vacuum numbers) > when we can predict that a dump-and-reload would be valuable. For non-indexed scans I would think that the fraction of free space (hence, useless I/O) would be the number you are after. VACUUM does not really offer this, but see contrib/pgstattuple. regards, tom lane