pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alan Hodgson <ahodgson@simkin.ca>
To: pgsql-performance@postgresql.org
Subject: Re: Why so slow?
Date: Fri, 28 Apr 2006 10:43:15 -0700
Message-ID: <200604281043.16083@hal.medialogik.com> (raw)
In-Reply-To: <BAY101-F1871B68D4D2782C7F21732ADB20@phx.gbl>
References: <BAY101-F1871B68D4D2782C7F21732ADB20@phx.gbl>

On April 28, 2006 10:31 am, "Bealach-na Bo" <bealach_na_bo@hotmail.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.




view thread (26+ messages)  latest in thread

Message-ID: <200604281043.16083@hal.medialogik.com>
Permalink:  ../200604281043.16083@hal.medialogik.com/
Also on:    postgresql.org/message-id/200604281043.16083@hal.medialogik.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: ahodgson@simkin.ca
  Subject: Re: Why so slow?
  In-Reply-To: <200604281043.16083@hal.medialogik.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