From: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
To: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: [NOVICE] Extreme high load averages
Date: Thu, 10 Jul 2003 12:00:16 +0530
Message-ID: <3F0D5550.21678.4E122CF@localhost> (raw)
In-Reply-To: <3F0CFBAE.6080002@ethereal-realms.org>
References: <Pine.LNX.4.44.0307071102390.1516-100000@zigo.dhs.org>
On 9 Jul 2003 at 23:37, Martin Foster wrote:
> By fixing the script and doing the appropriate full vacuum and re-index,
> the system is behaving much more like it should. Even if the process
> may seem a bit odd to some.
>
> The reason for removing rows on a daily basis is due to the perishable
> nature of the information. Since this is a chat site, posts over a day
> old are rarely needed for any reason. Which is why they are archived
> into dumps in case we really need to retrieve the information itself and
> this gives us the added bonus of smaller backup sizes and smaller
> database sizes.
I have an idea.
How about creating a table for each day. Use it for a while and rename it.
Since you can rename a table in transaction, it should not be a problem.
You can use inheritance if you want to query all of them. Using indexes and
foregin keys on inherited tables is a problem though.
That way deletion would be avoided and so would vacuum. It should be mich
lighter on the system overall as well.
Tell us if it works.
Bye
Shridhar
--
Kaufman's Law: A policy is a restrictive document to prevent a recurrence of a
single incident, in which that incident is never mentioned.
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: shridhar_daithankar@persistent.co.in
Subject: Re: [NOVICE] Extreme high load averages
In-Reply-To: <3F0D5550.21678.4E122CF@localhost>
References: <Pine.LNX.4.44.0307071102390.1516-100000@zigo.dhs.org> <3F0D5550.21678.4E122CF@localhost>
* 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