pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ogjunk-pgjedan@yahoo.com
Cc: pgsql-admin@postgresql.org
Subject: Re: VACUUMing for 30 minutes
Date: Thu, 23 Dec 2004 14:00:27 -0500
Message-ID: <382.1103828427@sss.pgh.pa.us> (raw)
In-Reply-To: <20041223181555.25535.qmail@web12706.mail.yahoo.com>
References: <20041223181555.25535.qmail@web12706.mail.yahoo.com>

<ogjunk-pgjedan@yahoo.com> writes:
> Now, I run VACUUM religiously every night, across all tables, but maybe
> that's an overkill for th number of updates and inserts in this DB. 

Or maybe it's not enough?  How many updates/deletes do you do in an
average day?

> INFO:  Pages 303359: Changed 23, Empty 0; Tup 114182: Vac 47, Keep 273,
> UnUsed 11798506.

You've got 303359 pages holding only 114182 tuples, which means this
table is *at least* two-thirds empty, and probably a lot more; there's
no way to tell from this output what the average tuple size is, but
I bet it's a lot less than a page.  The indexes look pretty bloated too.

I would recommend CLUSTERing the table on one index or another as the
easiest way of cleaning it up.  A somewhat faster way would be to drop
the indexes, VACUUM FULL, re-make the indexes, but there's more chance
of mistakes that way.

Once you've got the tables de-bloated, take another look at your FSM
settings; it's a good bet they are not high enough for your database
size.

			regards, tom lane



view thread (7+ messages)

Message-ID: <382.1103828427@sss.pgh.pa.us>
Permalink:  ../382.1103828427@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/382.1103828427@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, ogjunk-pgjedan@yahoo.com
  Subject: Re: VACUUMing for 30 minutes
  In-Reply-To: <382.1103828427@sss.pgh.pa.us>
  References: <20041223181555.25535.qmail@web12706.mail.yahoo.com> <382.1103828427@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