From: | Erwin Brandstetter <a9006241(at)unet(dot)univie(dot)ac(dot)at> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: History Tables Vs History Field |
Date: | 2004-03-10 05:40:44 |
Message-ID: | Xns94A843FBDDF92Xaraweda@195.34.132.16 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-10 05:47:59 | Re: Restricting Groups / Users |
Previous Message | Erwin Brandstetter | 2004-03-10 05:31:45 | Hardware for a database server |