X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 55D81D1DC59 for ; Wed, 10 Mar 2004 05:52:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 70833-02 for ; Wed, 10 Mar 2004 01:52:15 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 679D2D1DC2A for ; Wed, 10 Mar 2004 01:52:14 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i2A5qD1a093725 for ; Wed, 10 Mar 2004 05:52:14 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i2A5eiCQ092525 for pgsql-admin@postgresql.org; Wed, 10 Mar 2004 05:40:44 GMT X-Newsgroups: comp.databases.postgresql.admin Subject: Re: History Tables Vs History Field From: Erwin Brandstetter References: <404E87F0.5080504@midsouth.rr.com> Message-ID: User-Agent: Xnews/5.04.25 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mime-Version: 1.0 Lines: 19 Date: Wed, 10 Mar 2004 05:40:44 GMT X-Complaints-To: abuse@news.chello.at Organization: Customers chello Austria To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/179 X-Sequence-Number: 12748 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