From: Erwin Brandstetter <a9006241@unet.univie.ac.at>
To: pgsql-admin@postgresql.org
Subject: Re: History Tables Vs History Field
Date: Wed, 10 Mar 2004 05:40:44 GMT
Message-ID: <Xns94A843FBDDF92Xaraweda@195.34.132.16> (raw)
References: <404E87F0.5080504@midsouth.rr.com>
Bart McFarling wrote:
> I have a table that will recieve about 2000 inserts per day,
> Although it will technically never be dead data, about 99.999% of
> it will be uninteresing after 30-40 days, My problem is that I
> dont know if I should create a new table that is a history table
> or add a indexed field and ignore the data in queries unless
> someone asks for it. The latter is my prefered way of dealing with
> it, Is there something Im missing? Is there another way to do
> this? Any Suggestions are appreciated.
I guess if 99% of your queries would only ever use the "interesting"
data, you should go for the "history" version, which would speed your
those queries a lot. As you have distinct id's on both tables (having
fetched from the same sequence initially), u can always do a union
select on both tables in the rare cases this is needed.
HTH, just my 2c
Erwin Brandstetter
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-admin@postgresql.org
Cc: a9006241@unet.univie.ac.at
Subject: Re: History Tables Vs History Field
In-Reply-To: <Xns94A843FBDDF92Xaraweda@195.34.132.16>
References: <404E87F0.5080504@midsouth.rr.com> <Xns94A843FBDDF92Xaraweda@195.34.132.16>
* 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