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

Re: Why so slow?

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Why so slow?
Date: 2006-04-28 17:43:15
Message-ID: 200604281043.16083@hal.medialogik.com (view raw or flat)
Thread:
Lists: pgsql-performance
On April 28, 2006 10:31 am, "Bealach-na Bo" <bealach_na_bo(at)hotmail(dot)com> 
wrote:
> The exclusive lock is going to cause problems for me since the table is
> very active. Is there a way of getting around that or do I need to
> schedule the application that accesses this table?

If you don't need access to the old data constantly:

 - copy the live data to a new table
 - TRUNCATE the old table (which needs an exclusive lock but is very fast)
 - insert the data back in
 - for an event log I would imagine this could work

If you do need the old data while the app is running then I'm not sure what 
you can do.

>
> I'm running version 8.0. Is there autovacuum for this version too?

There is an autovacuum daemon in contrib; it's more annoying to setup and 
keep running than the one built into 8.1, but it works OK.

-- 
Eat right. Exercise regularly. Die anyway.


In response to

Responses

pgsql-performance by date

Next:From: Mark LewisDate: 2006-04-28 17:47:21
Subject: Re: hardare config question
Previous:From: Bealach-na BoDate: 2006-04-28 17:37:30
Subject: Re: Why so slow?

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