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

Re: Vacuum takes a really long time, vacuum full required

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Max Baker <max(at)warped(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Vacuum takes a really long time, vacuum full required
Date: 2004-10-19 16:21:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Max Baker <max(at)warped(dot)org> writes:
> I've been having problems maintaining the speed of the database in the
> long run.  VACUUMs of the main tables happen a few times a day after maybe
> 50,000 or less rows are added and deleted (say 6 times a day).

> I have a whole lot (probably too much) indexing going on to try to speed
> things up. 

> Whatever the case, the database still slows down to a halt after a month or
> so, and I have to go in and shut everything down and do a VACUUM FULL by
> hand.  One index (of many many) takes 2000 seconds to vacuum.  The whole
> process takes a few hours.

The first and foremost recommendation is to increase your FSM settings;
you seem to be using the defaults, which are pegged for a database size
of not more than about 100Mb.

Second is to update to PG 7.4.  I think you are probably suffering from
index bloat to some extent, and 7.4 should help.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Andrei BintintanDate: 2004-10-19 16:26:49
Subject: Index not used in query. Why?
Previous:From: Andrew SullivanDate: 2004-10-19 15:47:18
Subject: Re: Why isn't this index being used?

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