Re: How to Find Cause of Long Vacuum Times - NOOB Question

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Yudhvir Singh Sidhu <ysidhu(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to Find Cause of Long Vacuum Times - NOOB Question
Date: 2007-05-06 08:15:13
Message-ID: 463D8E91.4050605@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Yudhvir Singh Sidhu wrote:
> Versions: Postgresql version 8.09 on FreeBSD 6.1
> Situation: huge amounts of adds and deletes daily. Running daily vacuums
> Problem: Vacuum times jump up from 45 minutes, or 1:30 minutes to 6+
> hours overnight, once every 1 to 3 months.
> Solutions tried: db truncate - brings vacuum times down. Reindexing
> brings vacuum times down.
>
> I know my indexes are getting fragmented and my tables are getting
> fragmented. I also know that some of my btree indexes are not being used
> in queries. I also know that using "UNIQUE" in a query makes PG ignore
> any index.

If the increase in vacuum time is indeed because of index fragmentation,
upgrading to 8.2 might help. Since 8.2, we vacuum indexes in physical
order, which speeds it up significantly, especially on fragmented indexes.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Steinar H. Gunderson 2007-05-06 09:17:07 Re: How to Find Cause of Long Vacuum Times - NOOB Question
Previous Message Andreas Kostyrka 2007-05-06 07:06:02 Re: Feature Request --- was: PostgreSQL Performance Tuning