pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bealach-na Bo <bealach_na_bo@hotmail.com>
To: ahodgson@simkin.ca
To: pgsql-performance@postgresql.org
Subject: Re: Why so slow?
Date: Sun, 30 Apr 2006 10:29:55 +0000
Message-ID: <BAY101-F38A0FADC87E67C062FE5E1ADB00@phx.gbl> (raw)
In-Reply-To: <200604281043.16083@hal.medialogik.com>

>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

Obtaining exclusive locks on this table is very difficult, or rather,
will make life very difficult for others, so I'm averse to running
vacuum full or truncate (though I don't know how fast truncate is)
on a regular basis. I might just get away with running it
once a month, but no more.

(Lazy) vacuum, however is a much more palatable option. But (lazy)
vacuum does not always reclaim space. Will this affect performance and
does this mean that a full vacuum is unavoidable? Or can I get away
with daily (lazy) vacuums?  Disk space is not an issue for me, but
performance is a BIG issue. Of course, I realize that I could improve
the latter with better schema design - I'm working on a new schema,
but can't kill this one yet :|.

Regards,

Bealach





view thread (26+ messages)  latest in thread

Message-ID: <BAY101-F38A0FADC87E67C062FE5E1ADB00@phx.gbl>
Permalink:  ../BAY101-F38A0FADC87E67C062FE5E1ADB00@phx.gbl/
Also on:    postgresql.org/message-id/BAY101-F38A0FADC87E67C062FE5E1ADB00@phx.gbl

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: bealach_na_bo@hotmail.com, ahodgson@simkin.ca
  Subject: Re: Why so slow?
  In-Reply-To: <BAY101-F38A0FADC87E67C062FE5E1ADB00@phx.gbl>
  References: <200604281043.16083@hal.medialogik.com> <BAY101-F38A0FADC87E67C062FE5E1ADB00@phx.gbl>

* 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