pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Boes <jboes@nexcerpt.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Vacuum stats interpreted?
Date: Wed, 26 Nov 2003 18:51:33 -0500
Message-ID: <18578.1069890693@sss.pgh.pa.us> (raw)
In-Reply-To: <d505c533699f41f775300967bfdf6b94@news.teranews.com>
References: <6b79e0aa2a1c3668937e1ce087c4a819@news.teranews.com>
	<17932.1069883017@sss.pgh.pa.us>
	<d505c533699f41f775300967bfdf6b94@news.teranews.com>

Jeff Boes <jboes@nexcerpt.com> 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



view thread (6+ messages)

Message-ID: <18578.1069890693@sss.pgh.pa.us>
Permalink:  ../18578.1069890693@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18578.1069890693@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jboes@nexcerpt.com
  Subject: Re: Vacuum stats interpreted?
  In-Reply-To: <18578.1069890693@sss.pgh.pa.us>
  References: <6b79e0aa2a1c3668937e1ce087c4a819@news.teranews.com> <17932.1069883017@sss.pgh.pa.us> <d505c533699f41f775300967bfdf6b94@news.teranews.com> <18578.1069890693@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox