Skip site navigation (1) Skip section navigation (2)

Re: VACUUMing for 30 minutes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ogjunk-pgjedan(at)yahoo(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: VACUUMing for 30 minutes
Date: 2004-12-23 19:00:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
<ogjunk-pgjedan(at)yahoo(dot)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

			regards, tom lane

In response to

pgsql-admin by date

Next:From: Si ChenDate: 2004-12-23 20:28:27
Subject: pg_hba.conf and password authentication problem
Previous:From: ogjunk-pgjedanDate: 2004-12-23 18:15:55
Subject: Re: VACUUMing for 30 minutes

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group