pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Yudhvir Singh Sidhu <ysidhu@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to Find Cause of Long Vacuum Times - NOOB Question
Date: Sun, 06 May 2007 09:15:13 +0100
Message-ID: <463D8E91.4050605@enterprisedb.com> (raw)
In-Reply-To: <463D0BD5.3010404@gmail.com>
References: <463D0BD5.3010404@gmail.com>

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



view thread (9+ messages)  latest in thread

Message-ID: <463D8E91.4050605@enterprisedb.com>
Permalink:  ../463D8E91.4050605@enterprisedb.com/
Also on:    postgresql.org/message-id/463D8E91.4050605@enterprisedb.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: heikki@enterprisedb.com, ysidhu@gmail.com
  Subject: Re: How to Find Cause of Long Vacuum Times - NOOB Question
  In-Reply-To: <463D8E91.4050605@enterprisedb.com>

* 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